Allowing User to Download File from S3 Storage

前端 未结 5 1160
悲&欢浪女
悲&欢浪女 2020-12-08 05:57

Right now I am using Amazon S3 and Paperclip which is allowing my users to upload an image that is associated with the event they are creating. My ultimate goal is since oth

5条回答
  •  难免孤独
    2020-12-08 06:25

    You need to set the "Content-Disposition" to "attachment" in your HTTP response header. I'm not a Rails developer - so just Google it and you'll see plenty of examples - but it probably looks something like this:

        :content_disposition => "attachment"
    

    or

         ...
        :disposition => "attachment"
    

提交回复
热议问题