New Discussion

Notifications

You’re not receiving notifications from this thread.

File Uploads in Rails With Shrine Discussion

26
General

Request as you build the next few in the series that, if possible, you cover:
1) Direct upload to S3
2) JQuery/Multi-File/Background uploading

Thanks!

+1

Yes! They're on my list! Also going to do video uploads with transcoding and taking thumbnails of them.

Really great video. Thanks Chris!

Can you also cover secure upload/file retrieval together with direct upload to S3 and jquery/multi-file/background uploading (with progress bar)?

Nice one, Chris. Note Heroku allows you to save temporary files to its filesystem, but the files will be cleared every time the dyno is stopped/restarted. More on that here https://devcenter.heroku.co...

That is correct! I'll be covering that in the future, this is more just the basic introduction. S3 will be coming shortly.

Great video! Thanks Chris!)

You're welcome!

Great video, thanks. Note that the Shrine Homepage link should be http:// and not https://

Fixed! 3 minutes. Not too bad response time. 🍻

what is the difference from the Shrine CarrierWave

See Shrine for CarrierWave Users for a brief introduction. Other differences include proper direct upload and backgrounding support (see the motivational blog post for explanation of the issues with CarrierWave). There are many more differences/advantages, I started writing about them more in depth on my blog :)

great video! looking forward to the seeing more of shrine.

Good point about the migration edits on the first one. I learned that the hard way with my first big development project and I have done it this way ever since.

Andrew Cockerham Andrew Cockerham

How do you encrypt objects on s3? Paperclip has an option for amazon encryption, does shrine?

You'd have to look at Shrine's code for that, but if it doesn't support it yet, I'm sure it'd be very easy to add since it appears to simply be an additional header to add to requests. That would be a great open source contribution if it doesn't support it already!

If you look at the Shrine::Storage::S3 documentation, you'll notice that you can set :upload_options when initializing the storage, and this hash will automatically get forwarded to Aws::S3::Object#put on each upload, and that method supports options :server_side_encryption parameter, and any other :sse_* parameters you need.


Shrine::Storage::S3.new(
upload_options: {server_side_encryption: "AES256", ...},
**options
)

I found a error in this video, (i don't know it's ok ) but, when you make an update in one picture, the old picture does not disappear in Amazon s3

This episode was extremely helpful in getting Shrine up and running. I found the documentation to be less than clear, and this really helped.. Thank you!

Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 88,834+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.