Uploading files to S3 with React Native and Ruby on Rails

Intro I've recently been working on a top secret React Native project, powered by a Rails backend deployed to Heroku. The app allows users to upload images/videos to our backend as part of one of the flows. Originally, I was using a multipart/form-data request to upload the data + files directly to our backend, which would then upload them to S3. This approach has a couple of main disadvantages: Heroku timeouts will abort the request if it takes longer than 30s (can happen if uploading lots of, or big files) it increases the load on your backend This post will be specifically talking about AWS S3 but GCP has a Signed URLs feature too. Presigned URLs in S3 allow continue...