Storing documents on a web server is the best approach

Im working on a project, and one of the requirements is downloading and viewing documents. I decided to store documents on a web server, and not in a database. I have a question ... what is a good approach to storing a large number of documents on a server? The uploaded documents will be associated with the identifier of the master record in the database, so I thought about creating a folder with the same record date as the wizard, and then preassigned the file name to an identifier like this

2009-4-3
  234
  234-Document.pdf
  234-courtrecord.pdf

Does it seem solid and intuitive? I have added a file identifier if it will ever be moved from a folder for any specific reason. Will there be a lack of storage in this way?

Just looking for feedback and perhaps the best solution.

+3
source share
3 answers

Is there any significance in the fact that files are stored in separate folders with dates, and not in a large repository? I would recommend using a single directory repository and have a common file handler. Overtime will be helpful.

A record identifier adding a file name is a good idea if it is related to the file. I often added a timestamp.

FTP- (PHP) timestamp, .

+1

, (?) . . , . , , .

, , . .

/ / . . .

, , , , (, , ..). , -.

+1

How about a content management system like OpenCMS

Check this list for others.

0
source

Source: https://habr.com/ru/post/1705897/


All Articles