Speed up Rails API to upload/load files using active storage

268 views
Skip to first unread message

Murtaza Khan

unread,
Sep 18, 2019, 5:18:37 AM9/18/19
to Ruby on Rails: Talk
I have an app build on ionic as front end and rails as back end, I use aws s3 bucket for file uploading and digital ocean for production. Now the files uploading/loading takes so much time as for instance if uploading a file the file is first sent from ionic to rails API, rails API send the file to digital ocean and digital ocean send to aws s3, and this process is reversed to get the response, even for loading files it takes much time. What can I do to speed up my app.

Frederick Cheung

unread,
Sep 18, 2019, 5:22:18 AM9/18/19
to Ruby on Rails: Talk
On Wednesday, September 18, 2019 at 10:18:37 AM UTC+1, Murtaza Khan wrote:
> I have an app build on ionic as front end and rails as back end, I use aws s3 bucket for file uploading and digital ocean for production. Now the files uploading/loading takes so much time as for instance if uploading a file the file is first sent from ionic to rails API, rails API send the file to digital ocean and digital ocean send to aws s3, and this process is reversed to get the response, even for loading files it takes much time. What can I do to speed up my app.

You can upload files straight to s3 from the browser with a presigned post ( https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/S3/Presigner.html )

Fred

Reply all
Reply to author
Forward
0 new messages