I don’t know which way is better to use about uploading and saving a file in my local server.
for example I see someone that INSERT image’s link in the mysql field, I’m confused right now…
I want to upload some files and show that in other situation…
what’s the best and secure way to perform that?
I don’t know which way is better to use about uploading and saving a
Share
Store all the images in a folder called
photosfor example. Then, save an index of the file in your database assigning it an index number and other information. Save the file in the photos folder, renaming it[index_number].jpg, or whatever extension is needed. For example, if I upload the filecoolpic.jpg, it will be assigned an index number of 2845. The file itself is saved inphotos/2845.jpg.