Prevent Browser from Opening Download Window for CDN

0

I use Rackspace CloudFiles CDN. Apparently the way that Akamai works (company that backs CloudFiles program) is that the mime-type is an image and will force the user to download it - I can still use the image within HTML tags like the <img src="//cdn.com/image.jpg"/> but copying it in the URL or clicking the image will always prompt the download

I want to view that image within the browser - this happens with IE, Google Chrome and Firefox.

TheBlackBenzKid

Posted 2012-10-04T08:50:20.493

Reputation: 260

Answers

0

Check the content-type of the image URL. IF its set to say 'text/html' or application for example then that would cause the browser to auto-download the file.

The content-type needs to be set to jpeg or image to enable the content to be displayed within the browser.

If you use a Linux machine, you can 'curl -I cdn_URL' and it should return the content type within the header.

Take a look at that and see whats returned, that will hold a clue as to whats going on. If the incorrect content-type is set, you need perform a server-side copy, and add the correct content-type, from within Cloud Files API. I believe cyberduck allows you to set that... but im not sure.

Thanks

Anon

Posted 2012-10-04T08:50:20.493

Reputation: 1

1How can you set this in CyberDuck? – TheBlackBenzKid – 2012-10-04T10:08:23.617