Badge List uses Carrierwave to upload images and files to Amazon S3. In the case of images, we are using the MiniMagick gem to handle the actual image processing (there's no badge on that yet since it's a pretty simple tool).
An important thing to note is that Carrierwave comes out of the box with a way of uploading files via a Rails form directly to the Rails server. This method is super inefficient because it ties up the web server thread for the entire time the file is uploading. We don't use that functionality.
In the older parts of the app we use Carrierwave Direct (a different gem, not worth studying because we're retiring its use). In the newer parts of the app we're fully API-based and only accept image / file uploads via URL. In that model, we are utilizing Carrierwave inside of background threads to temporarily download the file from the remote URL, do any necessary processing (only for image files) and upload it back to S3.
How to earn this badge
- Learn about the Carrierwave gem. Refer to #Learning-Resources to get started.
- Solve the #Challenge
- Post the resources which were helpful in your own learning journey back to #Learning-Resources
- Request feedback