Easiest way to store images in database on Heroku?

你说的曾经没有我的故事 提交于 2019-12-03 07:41:00
Jack P.

I encourage you to not use your database to store images of that size.

S3 can be backed up very effectively, and is extremely hardened. From a data loss perspective, it's effectively safer then a development postgres database plan with Heroku.

The cost aspect is also not really best practice in this example. Although you're right they only enforce a row limit, I think it would be frowned upon to store large images (0.5 - 2mb) in the development database plan.

Finally, the speed of a transfer to S3 from EC2 (where Heroku is hosted) is very fast due to Amazon's internal networking.

Knowing that, I'd urge you to rethink your desire to store images of that size in a database. See this question for a more in depth analysis on the pros and cons.

There's also a dev center article about using S3 and Heroku.

Nidhi Sarvaiya

As mentioned by others the better option would be storing images in S3 or something.

Still Check out following link for storing image in Heroku PostgreSQL database

Upload images in database

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!