rejetto forum

Software => HFS ~ HTTP File Server => Programmers corner => Topic started by: gurukrish on February 01, 2012, 03:47:39 PM

Title: Help Needed How to Prevent File Direct Download But allow Streaming
Post by: gurukrish on February 01, 2012, 03:47:39 PM
Hi Friends,

Somehow i managed and customize the HFS 2.3 Beta to stream video over lan and through HFS HTML Template code, I force my clients to use only Firefox. I added VLC Context Menu that helps me to play video over LAN. But struck in that users just download the file to their hard disk from the server using firefox right click -> Save Link As option. If i prevent right click on the browser using javascript they can't access VLC context menu. Is there any way to detect in HFS about direct download by user and prevent downloading file but allowing them stream through VLC Player. I have searched the net for the solution. Still i have not able to find a solution.
Title: Re: Help Needed How to Prevent File Direct Download But allow Streaming
Post by: rejetto on February 02, 2012, 10:31:59 AM
there's no way to truly prevent it, because there's no difference between streaming and downloading (on YOUR side, it's a client side difference).

What you can do is make the template so that when they clicking on the video they actually launch a flash video player with that video. This is just making it harder, for those who don't know how to workaround it.
Title: Re: Help Needed How to Prevent File Direct Download But allow Streaming
Post by: gurukrish on February 02, 2012, 11:25:38 AM
there's no way to truly prevent it, because there's no difference between streaming and downloading (on YOUR side, it's a client side difference).

What you can do is make the template so that when they clicking on the video they actually launch a flash video player with that video. This is just making it harder, for those who don't know how to workaround it.

Thanks for your reply,
Is there way to disable Save Link As or track click event of Save Link As of Context Menu Item of Firefox using Javascript at user side. Still now i can only track right click button event on HTML page. Because this is a big drawback that users easily download and takes all valuable videos.
Title: Re: Help Needed How to Prevent File Direct Download But allow Streaming
Post by: rejetto on February 02, 2012, 03:40:08 PM
as i said: no way.
You can only make it harder, not impossible.
Title: Re: Help Needed How to Prevent File Direct Download But allow Streaming
Post by: gurukrish on February 13, 2012, 10:47:52 AM
Hi rejetto,

I think we can stop banning direct download and allow streaming.

For example while streaming through LAN with 1GB movie if i set Speed Limit for single address to 3000 KB/s. Normally if i stream using VLC it will reach maximum of 300 KB/s to 1000 KB/s. But you save the link using web browser it will reach the full peak of 3000 KB/s constantly. Based on this big variation we can conclude a user trying to save a file. So that we can Ban that downloading. We can check the Speed in server side continuously for 1 minute for each download and then decide whether it is streaming or direct download and then ban that download.

Waiting for you early reply,
K.Guru.


as i said: no way.
You can only make it harder, not impossible.
Title: Re: Help Needed How to Prevent File Direct Download But allow Streaming
Post by: rejetto on February 13, 2012, 11:39:52 PM
that's true in your case, not generally.
i can tell my downloader to limit the speed, and that's done.