Heroku File Storage

Viewed 57521

Heroku only has 100MB of file storage, right? I'm making a low-level rails app and I really like Heroku, but if my app allows each user to upload one picture, I may run out of space quickly...is there a simple solution that will allow me to have alternative file storage for profile pics or something of the like?

3 Answers

Yes, the simplest solution is to use the api.imgur.com, which allows you to upload 1250 images for free per hour.

You just need to register and get your client id then you need to send post request to

https://api.imgur.com/3/upload

with the image data as form data. Then you get a link of the uploaded image in response data which you can store it in database and then you can access the image like any other image with the link from front end.

more here:

Imgur API docs link

Related