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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Murtaza Khan
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 received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/a075db8c-cca9-4553-88b2-bf0e7e7de9d1%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

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

Frederick Cheung-2
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

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/0059673c-a18b-42e0-8003-6013925483e6%40googlegroups.com.