Q
Q
Quber2014-03-05 10:10:23
PHP
Quber, 2014-03-05 10:10:23

How to properly organize the structure of storing files and pictures on an FTP site?

The site plans to store thousands of pictures and files of different directories and directions.
Here is the question of how to properly organize the storage structure of all these files.
For example, there are sections News, Events, Blog, Photo album, Files, etc.
I thought something like this:

/uploads/files/news/file.rar
/uploads/images/news/2012-01/big.jpg
/uploads/images/news/2012-01/thumbs/small.jpg
/uploads/txt/news/plan_po_evacuacii.doc

or so
/uploads/news/files/file.rar
/uploads/news/images/2012-01/big.jpg
/uploads/news/images/2012-01/thumbs/small.jpg
/uploads/news/txt/plan_po_evacuacii.doc

Which option are you using? Which option is used in the CMS you know?
It should be borne in mind that there can be a huge number of files and pictures, as well as categories a la news, events, promotions, blogs, articles, events, photo albums, etc.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rpsl, 2014-03-05
@Rpsl

md5 from the file and spread it over the directories.
Do not store previews at all, but make them on the fly through nginx and put them in its cache. In extreme cases, store in a folder next to the original - it will be easier to delete.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question