-
Notifications
You must be signed in to change notification settings - Fork 10
Notes on how I got curl uploads to S3 to work #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I wanted the S3 image URL to come back as part of the JSON sent after a successful upload. To do this: Add an upload_url to the model that uses Paperclip's def upload_url
upload.url
end And add URLs come back as
|
The time stamp may be used by aws to decide whether to return the file or just "no change". |
Attempting to use this for my capstone project. I have uploads working through CURL to AWS S3, and @berziiii asked me to share my notes on the steps I've taken so far. Some of these are a bit shortcut-y—focused on getting a file uploaded. I haven't attempted anything through the browser so far; I'll follow up once I have that working.
brew install ImageMagick
bundle exec rails g scaffold movie title:string
gem 'paperclip', '~> 5.0.0'
bundle install
movie_params
method in controller according to instructions in this repogem 'aws-sdk'
to gemfile and runbundle install
.env
file:S3_BUCKET_NAME
,AWS_ACCESS_KEY_ID
,AWS_SECRET_ACCESS_KEY
,AWS_REGION
. The bucket name, access key, and secret access key are documented in the express-multer repo. The region is visible in the URL bar and looks something likeus-east-1
config/environments/development.rb
andconfig/environments/production.rb
:public/
directory.The text was updated successfully, but these errors were encountered: