SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Guru
    Join Date
    Aug 2004
    Location
    Taunton, UK
    Posts
    787
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Advice on uploading multiple mp3 files

    I currenly have a database storing information about different musicians and I would now like to add the ability to upload one or more mp3 files for each musican.

    I would appreciate some advice on how best to do this with regards creating the form. Is it best to just have a form allowing the user to select one mp3 file at a time or to have a form with say 10 form fields allowing a maximum of 10 uploads at a time? So if they only want to upload one mp3 file, they leave 9 of the form fields blank?

    I guess this question could apply to any file format being uploaded so hopefully someone can suggest a good way of dealing with this.

    Many thanks

    Paul

  2. #2
    PHP/Rails Developer Czaries's Avatar
    Join Date
    May 2004
    Location
    Central USA
    Posts
    806
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just write a quick javascript to add another form field for uploading when they click a link.

    For instance, list one upload field and below that field, have a link that says "Upload Another File" that will pop in another file upload field using javascript. I think that's probably the most elegant way to do it.

  3. #3
    ✯✯✯ silver trophybronze trophy php_daemon's Avatar
    Join Date
    Mar 2006
    Posts
    5,284
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Thinking about accessiblity and usability, you should probably make make those 10 and auto-hide them. Then reveal one by one as Czaries said. This way if JS is disabled your users will still be able to upload multiple files.
    Saul

  4. #4
    SitePoint Guru
    Join Date
    Aug 2004
    Location
    Taunton, UK
    Posts
    787
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the replies. Unfortunately I do not know javascript but I will have a look into it as perhaps it is not too difficult to grasp


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •