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

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.