content-type and S3 issues?

157 views
Skip to first unread message

Bradley.Joyce

unread,
Apr 27, 2011, 1:30:47 AM4/27/11
to ruby-fog
Hi all,

I'm using fog via CarrierWave to upload images to S3.

When the images (all .png's) arrive in my S3 bucket, they all seem to
have a content-type of binary/octet-steam instead of image/png

Did I miss a setting/config somewhere? I've been going in circles for
far too long on this... any help is much appreciated!

geemus (Wesley Beary)

unread,
Apr 27, 2011, 1:36:49 PM4/27/11
to ruby...@googlegroups.com
You can explicitly set the content-type I believe, otherwise the mime-type gem will try to guess based on the file extension of the thing you are uploading (so if it has no extension it will be binary/octet-stream).  My guess is that you are probably using files with no extension, so you would need to either add the extension or explicitly tell carrierwave that they are image/png

Let me know if that doesn't work out and we can dig in more or try something else.

Thanks!
wes
Reply all
Reply to author
Forward
0 new messages