Answer the question
In order to leave comments, you need to log in
Which of the above methods is easier and better to create a photo upload to the database?
Good evening, I am creating a photo (avatar) upload to the server, but here I emphasized several ways for myself:
The first is to move the uploaded photo to the server, to some folder, and save the path to the uploaded photo in the database.
The second is to save the photo to the database itself, but I'm not sure about this method.
So, what is the best way for a small site?
Answer the question
In order to leave comments, you need to log in
Of course, with a file, it is many times cheaper in terms of resources than pulling it from the database every time. It is desirable to keep the database completely in RAM.
Do they still store image files in the database in 2019?
Don't read old blogs. Store the files in the file system, and the paths to them - in the database
. Although there are perverted engines that store the layout of templates in the database ... where did this world turn ...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question