tigrish / redmine_s3

Uses Amazon S3 for storing attachments
50 stars 84 forks source link

Updated to use Amazon's aws-sdk for Ruby. Added options for secure, private, and expiring link options. #4

Closed benasher44 closed 12 years ago

benasher44 commented 12 years ago

I've updated the plugin to use Amazon's aws-sdk for Ruby, but I've stripped it down to only the core and s3 bits. I've also added flags for secure, private, and expiring links, since the redmine setup that I am using this for requires it. I've also seen requests for private links in various posts. I also ran into an issue where I was using an S3 account that didn't have create bucket permissions, but the bucket existed already because I had created it just for that account. To solve this, the new create_bucket behavior only tries to create a bucket if it doesn't exist.

The main difference between Amazon's current aws-sdk and the currently used S3 lib is that the new one abstracts away a lot of the S3 requests, and everything just looks like objects that you create and write to (vs. making put requests).

I've done some local testing to make sure all of the various combinations of public/private and un/secure work. Anyway, it would be really great to give this plugin an update!

tigrish commented 12 years ago

Awesome work!