Active 5 years, 8 months ago. Viewed 12k times. Improve this question. R2D2 R2D2 2, 4 4 gold badges 23 23 silver badges 42 42 bronze badges. We have no control over the remote hosting server, only the main website. If you left click on the file, it will try to play in the user's browser. This is not what we need to happen. These links need to be "download" links for the user to download the file to their machine, not play the file. If you have no control over the server, then there's little you can do.
Without copying the files to your own server, the only solution is to use your server as a kind of proxy so that you can set the appropriate headers. Trouble is, PHP would have to retrieve the remote file each time.
This would save you storage space, but obviously not bandwidth. Your user would also have to wait for your server to download the file. Not ideal. Viewed 2k times. Improve this question. Add a comment. Active Oldest Votes. Improve this answer. It does however work fine on Internet Explorer so if that's what your intranet users will be using, then no problem — ediblecode. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name.
Like Article. How to trigger a file download when. Welcome to GeeksforGeeks. Download Image. By clicking the download button. Recommended Articles. Article Contributed By :. Easy Normal Medium Hard Expert. I would be glad to help those who have already experienced this problem and have already solved it. Problem solved. If you want to download files from the remote server;. If you want to download files through the local server;. Does not download the image, goes to the source of the image is displayed.
The content you requested has been removed. Ask a question.
0コメント