Jump to content

Forcing Remote File Dowload


swapdude

Recommended Posts

Hi,

 

I have a video site with a lot of content hosted. I recently shifted to a CDN solution.

 

The problem now is that I cannot force user to download the file. The files just open in the browser window.

 

When the user clicks on download, I just use

 

header ("location: http://cndserver/file.mov");

 

What can I do to force download a file stored on a remote server?

 

Any help is appreciated.

 

Thanks in advance.

 

Link to comment
https://forums.phpfreaks.com/topic/222302-forcing-remote-file-dowload/
Share on other sites

Can you not configure the CDN to prompt for downloading? Perhaps specify your own custom Content-Type for files?

 

If not, you can't do it. You'd have to make your server retrieve the file and sent it to the user and that totally defeats the purpose of a CDN.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.