Retrieving multiple files

When the users... commented... that the old portal required them to enter in one... file... at... a... time, I assured them that we would use technology to alleviate their pains, and provide for ctrl-clicking multiple file selection. Little did I realize what a burden this apparently is for scripters. After several hours of research, I finally decided that I am going to have to roll my own control. The up-side of this is that, since I'm now going down the path of client-side compiled code, a few of the other daunting features will be a bit easier (such as retrieving detailed reporting information on the documentation that they may submit, which is stored in DocStudio databases). It amazes me how much time simple things like this can take, when complex tasks can go by so quickly.

Oh, I do want to share this blog entry that I came across, which details an elegant way to add multiple files using the <input type="file"> element without cluttering up the page. If only it supported multiple file selection at one time!

Well, my posts have been keeping me at work later than I should be... so today is a short one. I'm off to see my family and play on the 360. I hope to finish Project Gotham, the new Condemned demo, and get back to Quake 4; Have a great weekend!

Comments

  • Anonymous
    January 06, 2006
    So, If I understand you correctly; you're going to use the file dialog control that allows multiple file selection; then somehow capture the input; then make it spit out different file upload tags. Or just directly interface to the database without messing around with any HTML side stuff at all? I guess either way you can't avoid some kind of HTML generation since you'll need to have some kind of feedback so that the user knows which files got uploaded (successfully or otherwise). It'd be interesting if you could post how you code this up later on (non-DB-specific ofcourse and discounting any confidentiality agreements etc.).
  • Anonymous
    January 09, 2006
    Your interpretation is close... I don't need to spit out file upload tags, as I just need to retrieve the file names for possibly hundreds of files in multiple directories.
    I'll be writing client-side code that calls GetOpenFileName to open a dialog for multiple file selection. Then, I'll add the list of files to a hidden form variable, as well as visibly show them to the user (since files may need to come from multiple locations, they will need an opportunity to open the dialog multiple times before submitting).