i am building a webpage where a the user can upload images. i am going to use the file-system to store my images. i was wondering what is the best directory to hold such data? is it "var" directory? "srv" directory? or other?
Asked
Active
Viewed 1,837 times
-2
-
Store them on a separate partition, so that if users aggressively upload images, they can't fill the system disk(s) and cause problems for other services. Quota them per user, so one user can't fill the entire image upload space and cause a denial of service for other user uploads. – TessellatingHeckler Oct 02 '15 at 18:02
-
It would be a more on-topic question for ServerFault if you asked it as "what factors should I consider when choosing a folder?", rather than "which folder should I use?". Then there could be good answers like "consider packag updates overwriting the folders", "consider the filesystem standard location guides", and so on. – TessellatingHeckler Oct 02 '15 at 18:05
2 Answers
1
It's totally up to you. Maybe store them in a directory below your web site's root?
![](../../users/profiles/313604.webp)
Ryan Babchishin
- 6,160
- 2
- 16
- 36
0
Got an answer on:Unix & Linux stack exchange
As @jlliagre pointed out, the best location for a persistent uploaded files is under "/srv/" directory.