Re: Downloading multiple files
by Corion (Patriarch) on Jun 16, 2000 at 17:08 UTC
|
There is no such way to download multiple files in one go.
with http. I see two possibilities. Either you use the
tar
program (or the Archive::Tar module) to pack all
files together into one file to download, or you create
a page which opens the download URLs for all files
via JavaScript in pop-up fashion.
The second method has many pitfalls of browser compatibility,
client bandwidth and client stupidity, you also have to make
sure that each client can also manually download all files.
I would recommend looking into the one-file-solution.
| [reply] [Watch: Dir/Any] |
|
| [reply] [Watch: Dir/Any] |
Re: Downloading multiple files
by Zoogie (Curate) on Jun 16, 2000 at 18:21 UTC
|
I think that Corion has the right idea with tar'ing the files together. A simple way to do it without modules or temporary files is to use backticks:
print(`tar cf - $file1 $file2 $file3`);
More info on doing this can be found at a question I asked earlier: Auto-Backup Questions
- Zoogie | [reply] [Watch: Dir/Any] [d/l] |
|
Or use the Archive::TAR module. Saves you
the overhead of launching a tar process.
| [reply] [Watch: Dir/Any] |
Re: Downloading multiple files
by lhoward (Vicar) on Jun 16, 2000 at 17:42 UTC
|
What I am about to suggest makes me feel dirty
even thinking about it.... I'm not even sure if it would
work, but.....
How about using a frameset with a bunch of invisible (1 pixel)
frames each of which triggers the download for one of the
files that needs to be sent?
| [reply] [Watch: Dir/Any] |
(jcwren) RE: Downloading multiple files
by jcwren (Prior) on Jun 16, 2000 at 17:34 UTC
|
I've only written apps that download single files, so I have no experience with what AM is trying to do. I agree that you're correct about requiring a manual method.
Now, assuming he was using Netscape, could you not do a multipart-form/server push to do what he's trying to do? (IE doesn't support multipart-form, if you've never tried. That caused me a few hours of grief).
--Chris | [reply] [Watch: Dir/Any] |
RE: Downloading multiple files
by gregorovius (Friar) on Jun 16, 2000 at 21:08 UTC
|
Tarring the files would probably not be an option for
this AM. It assumes that clients will be able to untar the
files, which is not something you can assume for an open-
to-the-public site.
I think he could investigate if there's a way to do it
with java applets, though he may encounter trouble in
piercing through the browser sandbox to save files to disk.
| [reply] [Watch: Dir/Any] |
|
| [reply] [Watch: Dir/Any] |
Re: Downloading multiple files
by AgentM (Curate) on Jun 16, 2000 at 18:26 UTC
|
| [reply] [Watch: Dir/Any] |