Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
3
Reply
Prevent users from downloading a file using "direct targeting" URLs?
Satyapriya Nayak
Apr 20 2010 12:39 PM
4.3k
Reply
Hi!
Well I have always wondered how this is done...how do you actually prevent a user from beeing able to download a file by directly targeting the URL to the file in the adressbar?
Lets for instance say we have the file "File.zip" and its placed in the root directory for a domain called myfiles.com...if we just put the "File.zip"-file directly in the very root, then we would be able to type
www.myfiles.com/File.zip
and then we would be able to download the file...but how do I prevent that?..is there a way?..cause maybe I just want special users to be able to download that file..
To put it in a more realistic case....lets say we actually have created the above site, but in this case you can actually buy the file "File.zip"...then you only want customers to be able to download it who are register users and preventing people from simply typeing the URL..
Any ideas about how to prevent this?
Thanks in advance!
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
3
)
Next Recommended Forum
Formatting or Handling Sql Exceptions in c#
Usually buttons are used to cause validation but I want to use table column to cause validation