storing uploaded photos and documents - filesystem vs database blob

前端 未结 6 2077
鱼传尺愫
鱼传尺愫 2020-12-06 06:31

My specific situation

Property management web site where users can upload photos and lease documents. For every apartment unit, there might be 4 ph

6条回答
  •  借酒劲吻你
    2020-12-06 06:50

    Definitely store your images on the filesystem. One concern that folks don't consider enough when considering these types of things is bloat; cramming images as binary blobs into your database is a really quick way to bloat your DB way up. With a large database comes higher hardware requirements, more difficult replication and backup requirements, etc. Sticking your images on a filesystem means you can back them up / replicate them with many existing tools easily and simply. Storage space is far easier to increase on filesystem than in database, as well.

提交回复
热议问题