Storing file content in DB

前端 未结 4 980
温柔的废话
温柔的废话 2021-02-14 04:08

I am making a model in which i have a FileField. I want to store the file content in a database column, instead of file path. Any suggestions?

4条回答
  •  心在旅途
    2021-02-14 04:56

    Well, how about simply storing it in a Binary column? You can then store collection of bytes. And if the filename is important to you as well, you can store that in an additional name column.

提交回复
热议问题