Tommy

Tommy

  • NA
  • 1
  • 0

How to prevent public users to download file?

Aug 19 2008 5:24 AM

Hi

I would like to prevent public users to download avi files from my personal website. I have a photo album, people can view the images. When clicking it, it requests users login and able to download the corresponding avi file. The avi file size is around 50MB. Need to handle concurrent download.

e.g. user login -> click image in photo album -> http://www.dl.com/images/abc.jpg -> download and SAVE AS dialog box open -> http://www.dl.com/video/abc.avi

If user does not login -> click -> http://www.dl.com/images/abc.jpg -> NOT allow to download

But, how can I prevent user directly open url of http://www.dl.com/video/abc.avi to download without login?

Do I need to change the file name from abc.avi to a temp file name 234lkh8yihiafr.avi for download?

I use .NET 2.0, ASP.NET, C# and MSSQL2005.

How can I do it?


Answers (1)