Jump to content

How to upload image from a form into mysql including verification


anita999

Recommended Posts

Could someone please recommend an example of uploading an image (jpeg or gif) using a form and doing the PHP validation of the image and then inserting it into a mysql table as a blob.

 

I'm also interested in the validation part since I want to check whether a PHP script is inserted as part of the comments on the image and any other checks that can be performed to avoid insertion of the image into the DB in the case of a malicious image file.

 

Thanks in advance,

Anita

Link to comment
Share on other sites

In one of the messages above, it was stated that it would be better to store the images in a filesystem and then have the DB link to the file. 

 

I can understand that storing it in the DB would take up a lot of space, but what would be strong reasons to store it in the filesystem instead of the DB directly?  Is the assumption that the web sites that have a large subscriber base i.e. several hundred thousand subscribers would store the images in their filesytem instead of in the DB as a blob?

 

 

Thank you,

Anita

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.