Jump to content

[SOLVED] Image upload and download question


Sandip

Recommended Posts

Hi,

Background :

I have a small question. In my website I have few imageboxes. I am asking user for image file and place it in image box. User will preview file and if he is happy he can upload(submit) the  page. Now I am setting image as imagebox background using javascript as Image selection is just another pop up with browse button. After submitting the page I am reading file contents from its client location and insert it in to MYSQL. when I view binary contents using MySQL query browser I can see tht image but when I try to download it I cant see image.for downloading I read blob data then set headers and echo the contents.

 

Question:

My question is do I need to read file from its temp location on the server always? Can I just read file from client location and insert contents in to the database and then retrive it? I use strlen to get file size after reading it and image type from image name.

 

Thanks a lot for your help !

Sandip

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.