Asynchronous File Uploads

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • yuvaly
    New Member
    • Feb 2008
    • 6

    Asynchronous File Uploads

    Hi

    I hope this is the right forum for this question...

    I have a form, from which I want to asynchronously upload one or more pictures.
    After each image is uploaded, I want to display its thumbnail in this form

    I understood I should use iframes, but I I couldn't find a working example or explaination of how to make it work...
    I would appreciate your help
    Yuval
  • pronerd
    Recognized Expert Contributor
    • Nov 2006
    • 392

    #2
    You can not auto upload files via JavaScript. It would be a major security issue if you could.

    Comment

    • rnd me
      Recognized Expert Contributor
      • Jun 2007
      • 427

      #3
      a few notes/suggestions:

      -you can only select one file at a time, but you could begin uploading each image as soon as the user clicks 'open' in the file browse box.

      - name your iframes and change the target attribute of the form to the name of the iframe you want to use. perhaps the simplest would be to hard-code 3 or 4 iframes, and rotate them for each form's submit.

      -you will need a server or firefox3 to be able to upload images as you describe; you have to post, and you need a server to catch the post and turn it into an actual file.

      -you can use a regular <img> tag src'd at the new url of the last uploaded image to show the image. alter the width and height attribs to produce a thumbnail.

      -since you will need a server anyway, google php image upload and look for existing, widely available solutions.

      Comment

      Working...