AJAX Image Upload Preview
Posted: Thu Jun 22, 2006 9:32 am
Not sure where to begin on asking this, so I'll start with what I want to accomplish.
Basically my idea is that I want the user to select an image file to upload, and then it shows a thumbnailed preview of the selected file in a small frame off to the side, without reloading the page (hence the AJAX piece).
My dilemma here is that I cannot figure out how exactly to post this via Javascript to the PHP page to thumbnail/resize the image, and then send back the preview, because Javascript cannot access the raw data of the selected file, only the filename (right?).
Is this even possible? Or am I going to have to post to the page manually?
Basically my idea is that I want the user to select an image file to upload, and then it shows a thumbnailed preview of the selected file in a small frame off to the side, without reloading the page (hence the AJAX piece).
My dilemma here is that I cannot figure out how exactly to post this via Javascript to the PHP page to thumbnail/resize the image, and then send back the preview, because Javascript cannot access the raw data of the selected file, only the filename (right?).
Is this even possible? Or am I going to have to post to the page manually?