A
A
AleDv2014-10-24 16:33:49
PHP
AleDv, 2014-10-24 16:33:49

How to organize the storage of images on the server?

Hello. There is a message board where users upload photos. What is the best way to post these photos?
In one folder or create subfolders for each ad?
How will it be more correct and faster?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
M
Max, 2014-10-24
@AloneCoder

Push by hash into subfolders
/c4c/a42/38a0b923820dcc509a6f75849b

S
Seva, 2014-10-24
@Zewkin

Telepaths who know about the structure of the application are on vacation.

M
My joy, 2014-10-24
@t-alexashka

I have 80GB of photos in the bulletin board on my project. I do by category:

pics/users/cat/subcat/{{ID}}/1.png
pics/users/cat/subcat/{{ID}}/2.png
...

K
kompi, 2014-10-24
@kompi

It makes sense to group by number so that there are fewer problems with the performance of the file system.

T
Twist, 2014-10-24
@bboytiwst

/year/month/day/
or
/year/month/day/ad type

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question