How to store documents encrypted

时间:2015-06-26 09:33:23

标签: php mysql mongodb document

I am writing a web application that will store documents server-side. Now I am looking for the best way to do the document storing part.

Directly in file system is no option, because the user should not have direct access to them. So I have some options in mind and want to here your opinion or experience or ideas for other possible ways.

  1. Store them in some password protected container format like zip, and only store container and document name in table. Split archives after a size limit.

  2. Store them as BLOB inside MySQL in a separate table.

  3. Store them in a MySQL archive engine table. https://dev.mysql.com/doc/refman/5.1/en/archive-storage-engine.html

  4. Use MongoDB and GridFS to store the data.

Requirements:

  • The user has no direct access to the files.
  • The files must always be consistent.
  • Storing files in the table should not slow down the rest of the application.

If I use a DB, I will store the data in a separate table and search over a second table with some meta data fields.

0 个答案:

没有答案