Did you ever find a solution to this? I too have done this with carrierwave but cannot figure out how to get the actual file type to transfer as the content type with just the jQuery File Upload plugin.
I managed to change it so that all files uploaded now are set to Content-Type: image/jpeg on S3. That may help you, but it doesn't help me, as I now have PDFs and MP3 files that, when uploaded, show up in S3 as Content-Type: image/jpeg.
Anyway, I basically followed the tutorial on heroku for the initial setup, but changed the instance variable in my controller to this:
@s3_direct_post = S3_BUCKET.presigned_post(
key: "uploads/#{SecureRandom.uuid}/${filename}",
success_action_status: 201,
acl: :public_read,
content_type: "").where(:content_type).starts_with("")
(Bold part is what I added.) Don't ask me why, but this change makes every file I upload default to image/jpeg file type.
Please let me know if you found a solution that uploads the ACTUAL content type.