in reply to Directory Upload

I'd like to expand on zentara's reply a bit. As he states, file uploads are initiated from the browser when they see a <INPUT TYPE=FILE> HTML tag. So you can automate upload using LWP. as shown in his example. In that case, you need that script to run instead of the normal browser initiated upload. The big disadvantage there is that you have to offer your Perl script as the UI instead of using the browser and its built in file selection capabilities. When browsers see the <INPUT TYPE=FILE> tag, they offer up the file selection dialog that lets you pick the file to be uploaded.

If you want to use the browser your options for multiple files are more limited. Some browsers support up to 5 <INPUT TYPE=FILE> tags and let you pick up to 5 files for upload, but that's not universal. Because of the file number limitation in the browser, your options for using JavaScript or other DHTML are also therefore limited, but I have seen some references to dynamic client side methods for handling this, so there may be more possible there than I think there is. All the ones I ran across when investigating this simply made use of 1-5 upload tags.

In either case, you need something on the server side to accept and process the upload requests. That's easily done using Perl. For example, I have written server side CGI's that take zip files from browser clients and unpack them on the server. But there's no way to automate zip creation from the browser on the other end. About the best you can do is accept different file types and key your actions off the type (e.g., the file suffix). You could do something with a Java applet here but I'm now in over my head. 8-)

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.