I have the URL of video file.
I want to get downloading it by link clicking. How I can do it whithout opening the file in new window?
I have the URL of video file.
I want to get downloading it by link clicking. How I can do it whithout opening the file in new window?
If you're using Apache, I believe this is possible by adding the following lines to your .htaccess file. Duplicate the line for each file type
AddType application/octet-stream .mpg
AddType application/octet-stream .mov
AddType application/octet-stream .mp4
I normally do this via .htaccess or editing the headers on a php file I want to force a download of (such as when creating PDF files server side).
I'm afraid I don't know if there's a reliable way to do it via Javascript alone.