refile / refile-s3

Amazon S3 Backend for Refile
MIT License
36 stars 88 forks source link

Use Object#get instead of Kernel::open to get object from backend #26

Closed relaxdiego closed 7 years ago

relaxdiego commented 8 years ago

Hello. Firstly, thank you for this gem. It saved me a lot of time a few months back when trying to work with Ceph as the backend. Today I realized that I forgot to submit this PR as a change needed to make the gem work with backends that use self-signed certs (such as those in dev environments). I'm submitting this for your review/approval.

Commit message follows:

This change uses the object instance directly to get the file from the backend instead of using a presigned URL to get it. Presigning was not necessary in this method since the URL doesn't get passed on to the client anyway. Also, by avoiding Kernel::open, we avoid having to manage certificate stores in both aws-sdk and open-uri.