Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Uploading Multiple Files via single input?

Status
Not open for further replies.

mwolf00

Programmer
Nov 5, 2001
4,177
US
I've searched the forum already and I'm afraid that I know the answer to this....[cry]

I have a used that will need to upload multiple files (up to 100 at a time) to the web server. FTP access is not available - all I can give them is regular web access via asp.

Any ideas on how I can make this as easy as possible (I don't consider single input boxes for each file very easy).

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook (No, I'm not Rick)

zen.gif
 
I would suggest your user to ZIP all those 100 files, then use one ASP form upload for that file and then have a program unzip it on the server.
 
not too terribly sure of this, but may need to check with the JS forum...

selectionPage --> javascript interface IFRAME in local machine and parse selected files via JS, this is then written to a hidden form field

ConfirmPage --> ASP to parse the hidden field values from string to array to individual files, using count() or ubound() on this then should yield you the ability to dynamically create the correct number of upload boxes ( style:invisible ) then upload.

UploadPage --> ASP with response.flushes for the mass of uploads with intermediate page flsuhes to inform user fileis uploaded, might be an issue due to upload times may cause command timeouts or script timeouts

ConfirmUpload --> ASP validation page that denotes whichfiles were uploaded successfully etc, also with proper error handling you could trap the timeouts aforementioned, pass the incomplete file list to the confirm page, with a submit back to the upload page to complete the list.

the main factor of uncertainty is page1, the iframe localhost.
 
Ayac - nice suggestion - any tips on using ASP to unzip?

DreXor, I think that I could work this via javascript, but I don't know how to access her local files (localhost won't work - her machine is not a server)

Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook (No, I'm not Rick)

zen.gif
 
the iframe content would be something along the lines of file://c/

as for zip .. from winzip you can download command prompt tools, and with that, you can use it in conjuction with a server side object that will execute command objects, like i think softwareartisans.com or serverobjects.com has an ASPExec object that will let you run anything you want in command prompt, and capture it for you to manipulate.
 
Morning wolf00

Thinking out loud here on this in regards to how I managed a major upload and parse from an ancient program that spat out text files to a client machine in a particular directory that later needed to be uploaded – parsed – and inserted to tables appropriately.

Everything of course was closed doors leading to my write.

First step I did was simply have the user enter the directory in which the files were located. This of course could have been automated but I had varying naming conventions to deal with. Then I simply ran a .vbs on the client machine grabbing them all. At this point is was quite simple really. I just ran across the network and copied them to the server directory. In essence no upload was needed. Then I later treed the files out to the screen from the server directory for viewing purposes to know the transfer made it etc…

I did write a automatic actual upload script a loooong time ago that was a similar process but actually did upload the files to the server off just the directory name. Can’t find it but when I do I’ll post it. I recall it was ugly though and a poor performer


___________________________________________________________________
[sub]
onpnt.com
SELECT * FROM programmers WHERE clue > 0
(0 row(s) affected) -->faq333-3811
[/sub]

 
If time does not matter, you can schedule a batch file for unzip, so in a certain time of the day it unzips the file if it is there.

How to do it other ways... hmmm I have to think about it more...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top