rejetto forum

Software => HFS ~ HTTP File Server => Programmers corner => Topic started by: rejetto on July 04, 2012, 02:04:46 PM

Title: multiple files download
Post by: rejetto on July 04, 2012, 02:04:46 PM
what web technologies are available today for downloading many files at once (or very easily) ?

SOLUTION A
making an archive (compressed or not) of those files.
This is the solution used by HFS 2, and Gmail.
Pros
- compatible with every browser
- sub-folders supported
Cons
- Files need to be unpacked

SOLUTION B
via javascript open new windows pointing to those files. (never saw it, just came now to my mind)
Pros
- files are ready for usage
Cons
- some browsers could deny these new windows (to verify)
- the user will be prompted for every file on the location to be saved (to verify)
- sub-folders are not supported


anything else?
i would say solution A is much better than B.
It's not easy to program a lightweight version anyway (as i did with TAR archives in HFS 2).
Title: Re: multiple files download
Post by: Denis on November 11, 2012, 10:44:16 PM
Run a Java application on the users computer. In that way the files can be transferred to the user without compressing or something similar. The only problem is that the user need to have Java installed - but we are in the 21 century, I mean: who doesen't have Java installed? The only thing that needs to be done is the user allow the Java application to run, and then if the user deny it could just download all the files compressed :-)

I think that would be the best solution :-)
Title: Re: multiple files download
Post by: rejetto on January 01, 2013, 02:54:10 PM
sadly i fear you are wrong. AFAIK java running in the browser cannot write files on the computer file system.
Title: Re: multiple files download
Post by: jannuh on January 01, 2013, 08:32:55 PM
I think the TAR archives as we have now is a fine solution, unpacking isn't a hard job...
Title: Re: multiple files download
Post by: Denis on January 02, 2013, 09:12:54 PM
I have a Synology disk station that can access the users filesystem if you press allow when the java application want to run :-)

So it probably is possible since they can do that :-)

But a zip stream is the best solution, a tar archive isnt a possibility for the end user :-)
Title: Re: multiple files download
Post by: rejetto on January 03, 2013, 09:02:07 PM
Interesting, support for it must have been added in recent years
Title: Re: multiple files download
Post by: raybob on January 04, 2013, 05:15:34 AM
I know C# (which is similar to Java) so I could contribute if you decided to do that...

But yeah I think a zip stream is the best idea though.  This could even be done as simply as something like command line PHP or 7zip.
Title: Re: multiple files download
Post by: Denis on January 04, 2013, 04:50:12 PM
I'm really looking forward to see this :-)