Skip navigation
btvbillb
Currently Being Moderated

How to upload and overwrite a file from a dynamic list

Jul 17, 2012 6:29 AM

I need to come up with a way to upload and overwrite and existing image file from a dynamically generated list. For instance, there would be a drop-down select box with Company A, Company B, Company C, etc. and when the user selects one of them it should display a prompt to upload a new logo image file, overwriting the existing logo file. Any help would be appreciated.

 
Replies
  • Currently Being Moderated
    Jul 17, 2012 7:25 AM   in reply to btvbillb

    I'm not sure why you need a prompt.  Sounds like an unnecessary annoyance to me.

     

    A simple form with a select and input type="file" should get you started.  Then I would probably do something like:

    1.  upload the file to a temp folder on your server.

    2.  Rename it according to what company was selected.

    3.  Move it to it's permanent folder.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 17, 2012 9:35 AM   in reply to btvbillb

    That's why you do it on the server.  All the user does is submit a form.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points