Setting the Content-Type in direct to S3 upload using Rails and jQuery File Upload

后端 未结 3 1472
旧时难觅i
旧时难觅i 2020-12-16 16:16

I\'ve seen many questions here on this topic but nothing I\'ve come across has worked for me, so here I am posting another...

I\'m on Ruby on Rails trying to configu

3条回答
  •  借酒劲吻你
    2020-12-16 17:07

    I believe the most current syntax for aws-sdk (2.9.6) is:

    @s3_direct_post = S3_BUCKET.presigned_post(
                      key: "uploads/#{SecureRandom.uuid}/${filename}",
                      success_action_status: 201,
                      acl: 'public-read',
                      content_type_starts_with: '')
    

提交回复
热议问题