A library for uploading very large files to S3.
Add this line to your application's Gemfile:
gem 's3_multipart_upload'
And then execute:
$ bundle
Or install it yourself as:
$ gem install s3_multipart_upload
S3MultipartUpload.config do |c|
c.s3.bucket_name = "S3_BUCKET"
c.s3.key = "S3_KEY"
c.s3.secret = "S3_SECRET"
end
S3MultipartUpload.config do |c|
c.gd.client_email = "GD_CLIENT_EMAIL"
c.gd.private_key = "GD_PRIVATE_KEY"
c.gd.secret = "GD_SECRET"
end
Require S3MultipartUpload JS in your application.js
//= require s3-multipart-upload
The library has dependency on JQuery, Underscore.js and Bacon.js
Mount S3MultipartUpload Engine in your routes.rb
mount S3MultipartUpload::Engine, at: "/s3multipart", as: "s3_multipart"
In order to use S3 request signing link, use the following (for the above mounted engine)
s3_multipart.sign_request_path
S3MultipartUpload.upload_from_google_drive "GOOGLE_DRIVE_SHARE_URL", "S3_UPLOAD_PATH"
- Fork it ( https://github.com/[my-github-username]/s3_multipart_upload/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request