- 1

Image post in php!

For image upload, which secure method is used by everyone for upload an image as in directory or sql database..

6th Apr 2021, 7:12 AM
Muhammad Belal
Muhammad Belal - avatar
5 Réponses
+ 3
Generally, I'd use SQL instead of the file system but mostly not for security reasons. I'd do it because having all data in your database is easier to manage through backups, deployments... I recommend storing your images in a blob field in an SQL table for those benefits. Both the file system and the database can be very restricted from malicious people. If you struggle to implement your image uploader, start with a file uploader like this: https://www.w3schools.com/php/php_file_upload.asp
6th Apr 2021, 8:00 AM
Josh Greig
Josh Greig - avatar
0
I already used both methods. But SQL method is expand the time of loading and gives me some error or directory type is well but anyone can access this so I want to know that how to secure it...
6th Apr 2021, 8:15 AM
Muhammad Belal
Muhammad Belal - avatar
0
Muhammad wrote, "I already used both methods. But SQL method is expand the time of loading and gives me some error or directory type is well but anyone can access this so I want to know that how to secure it..." Response: Pick a place and I'll go into detail on how to secure it. I'm suggesting to put it all in SQL but if you don't like that, just make clear that you want to secure it on the file system so I don't waste time talking about both scenarios.
6th Apr 2021, 8:23 AM
Josh Greig
Josh Greig - avatar
0
Ok now I'm working on my page and . If I got some error then then I ask you...
6th Apr 2021, 8:28 AM
Muhammad Belal
Muhammad Belal - avatar
0
Muhammad wrote, "Ok now I'm working on my page and . If I got some error then then I ask you..." Response: ok
6th Apr 2021, 8:29 AM
Josh Greig
Josh Greig - avatar