S3FileCacheDownload
Provide helper method that S3 file download use temporaly file
Usage
First, execute bin/rails s3_file_cache_download_engine:install:migrations.
Second, include S3FileCacheDownload::Helper module to your controller.
class YourController
include S3FileCacheDownload::Helper
endCall send_s3_file method.
class YourController
include S3FileCacheDownload
def show
send_s3_file :your_bucket_name, :your_file_key
end
endIf you want to use option, you can pass option.
class YourController
include S3FileCacheDownload
def show
send_s3_file :your_bucket_name, :your_file_key, disposition: 'inline'
end
endInstallation
Add this line to your application's Gemfile:
gem 's3_file_cache_download'And then execute:
$ bundleOr install it yourself as:
$ gem install s3_file_cache_downloadContributing
Contribution directions go here.
License
The gem is available as open source under the terms of the MIT License.