Y
Y
yanis_kondakov2018-01-18 11:57:43
Database
yanis_kondakov, 2018-01-18 11:57:43

File storage. Where to store files and how to work with the database?

Good afternoon.
There is a page where users register/authorize. Each user should be able to:
- create / delete folders
- upload / delete files
- respectively, the user sees only his folders / files The
question is, I can not understand where and where to upload files.
Store them in a database? Or store only file names in the database, and store the files themselves in the file system?
But then how to organize the file system? Work with the api of some storage or are there other options?
All this I need only for a basic example. No paid services.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
pfg21, 2018-01-18
@yanis_kondakov

the files themselves are better not to crap in the database, especially if they are large, there will be more minuses than pluses.
files in the file system with a unique name - a random number in base64. the original name and all other parameters in the database are the best use of both storage media.
If large volumes are planned at once to focus on network fs.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question