tags:

views:

49

answers:

1

I have a CDN that is storing media files. Each file I want to store as just the ID number of the file in the data so, file.zip = 4423342 on the server. The problem is, the CDN does not allow php or any form of programming. How can I make it so I have a local file that is used to set the headers and let me change it so when they download a file from the CDN it downloads as file.zip instead of 4423342. Now I know this is simple if the file is stored on the same server as the file that sets the headers.

Thanks!

A: 

If your CDN doesn't allow you to set the name/headers of the stored file, you cannot do it on your server. The user gets directed to the CDN server, and you can't "inject" anything into that connection.

I would look into looking up the options your CDN does offer. For example, you might be able to append something like /file.zip to the end of the CDN url, and still get the correct file.

That is – if the CDN url is http://cdn.example.com/113312, maybe http://cdn.example.com/113312/file.zip works as well.

Joel L
I could look into that, fyi the CDN is the vps.net offer.
mikelbring