0

I've been recently experimenting with file uploads in PHP and jQuery and such, and I was wondering if it is possible for a user to open a file dialog box (with the "file" input tag), select an image, then display that image in an img tag? The user would then click "Upload", which would read the image data from the img tag to upload to the server? Anyways, something like that... I want the user to be able to view their pictures before they're uploaded. I've current integrated on my page a file input tag with a custom button, but am kinda stuck at that. Could anyone lend a hand? Any help is appreciated. Thanks.

Nickersoft
  • 631
  • 9
  • 28

1 Answers1

0

Take a look at Show an image preview before upload which has some information about doing this in HTML5.

Other than that, using a standard <input type="file" /> it's probably not going to happen. You could use something like Flash or Silverlight which has sandboxed access to the computer and maybe able to read and display the image before the upload.

Community
  • 1
  • 1
Steven V
  • 15,061
  • 3
  • 56
  • 73