nosmas Posted April 12, 2009 Share Posted April 12, 2009 Hi guys. I was working with a page that includes uploading pictures. I uploaded the image File and saved the path in mysql database, but I didn't feel this is safe.Can any body show me how to upload an image directly into mysql database. thanks for your help. Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted April 12, 2009 Share Posted April 12, 2009 I didn't feel this is safe What part do you think is not safe? On most hosting, the database server is accessible to all the hosting accounts and most databases don't have bad password attempt detection and lockout, so it is actually easier to break into a database because you can just put a script on any account on the server to brute force try usernames/passwords against the database. With the proper permissions set, files are much safer in a folder within your account's folder tree and serving files from folders is much faster than serving them out of a database. Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted April 12, 2009 Share Posted April 12, 2009 why? if you want to prevent hot linking to your images then probably best use this... http://underscorebleach.net/jotsheet/2004/11/stop-image-hotlinking-tutorial-htaccess-apache storing files in the database cost quite a lot - you get large overheads in your database storage and if you are trying to prevent others getting your images then don't bother they have them once they see it on their screen. you can water mar images like stock site do so that they don't see an image without it unless logged/purchased.. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.