Skip to main content
Inspiring
July 17, 2012
Question

How to upload and overwrite a file from a dynamic list

  • July 17, 2012
  • 1 reply
  • 624 views

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.

    This topic has been closed for replies.

    1 reply

    Inspiring
    July 17, 2012

    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.

    btvbillbAuthor
    Inspiring
    July 17, 2012

    That's what I would do but this is for the DIY website people with all the skills of the Fisher-Price/Windows 8 crowd, who don't have a clue about moving files, renaming, etc.

    Inspiring
    July 17, 2012

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