Re: [whatwg] Multiple file download

2010-03-17 Thread Ian Hickson
On Tue, 23 Feb 2010, Jose Fandos wrote:

 Currently there are implementations allowing multiple file upload 
 without the need for flash or java applets.
 
 What doesn't seem to be there, unless a java applet is used (haven't 
 come across one using flash) is the multiple file download. Even Google 
 Docs uses a zip file to download multiple files.

 Was wondering if this could be made part of the standard. If something 
 like resource packages http://limi.net/articles/resource-packages/ 
 were used, the server would still be sending one file which could be 
 heavily compressed, letting the UA to decompress and display as if a 
 bunch of files had been downloaded separately.

If this needs a change to the specs, it seems like something that should 
be done either as a new type (e.g. multipart/archive) or some extension to 
HTTP. I don't think there's anything we should really do at the HTML level 
to support something like this.

I would recommend developing a type that expands as you describe, and then 
approaching browser vendors directly to see if they would be interested in 
implementing that feature.

Alternatively, you could suggest to browser vendors that they just 
implement a UI feature that, upon receiving an archive, offers to expand 
the archive automatically. Some already do (e.g. on Mac it's common for 
.dmg files to be automatically mounted -- effectively most Mac users are 
already experiencing what you're describing without any new features being 
needed, it just works).

Another possibility is for browsers to offer UI that given a bunch of 
links will apply the same download settings to each one, so that the user 
can just drag-select a bunch of links and download them all with one or 
two clicks.

In conclusion, this seems out of scope for this working group.

-- 
Ian Hickson   U+1047E)\._.,--,'``.fL
http://ln.hixie.ch/   U+263A/,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'


Re: [whatwg] Multiple file download

2010-03-10 Thread timeless
On Fri, Feb 26, 2010 at 3:31 AM, Jose Fandos iaminlon...@gmail.com wrote:
 Er... sure. It is not as convenient for certain web apps when compared to
 desktop apps. With this supported, the gap get's reduced.

Adding support for tar (and all of its variations) involves adding
extra code, testing, etc. to browsers. This is sometimes called bloat,
and can be painful for browsers that work on mobile devices. Things
aren't free, especially not duplicative features.

I'm quite happy to demand that web sites include code for generating Zip files.

http://www.pkware.com/documents/casestudies/APPNOTE.TXT V. General
Format of a .ZIP file

the zip format is fairly streaming friendly, the directory is at the
end of the file. And if you're actually generating a file which has so
many records that you can't remember all of them, you're probably
trying to attack my user agent, so I'm quite happy that you'd fail.


Re: [whatwg] Multiple file download

2010-03-10 Thread Eric Uhrhane
On Wed, Mar 10, 2010 at 12:28 AM, timeless timel...@gmail.com wrote:
 On Fri, Feb 26, 2010 at 3:31 AM, Jose Fandos iaminlon...@gmail.com wrote:
 Er... sure. It is not as convenient for certain web apps when compared to
 desktop apps. With this supported, the gap get's reduced.

 Adding support for tar (and all of its variations) involves adding
 extra code, testing, etc. to browsers. This is sometimes called bloat,
 and can be painful for browsers that work on mobile devices. Things
 aren't free, especially not duplicative features.

 I'm quite happy to demand that web sites include code for generating Zip 
 files.

 http://www.pkware.com/documents/casestudies/APPNOTE.TXT V. General
 Format of a .ZIP file

 the zip format is fairly streaming friendly, the directory is at the
 end of the file. And if you're actually generating a file which has so
 many records that you can't remember all of them, you're probably
 trying to attack my user agent, so I'm quite happy that you'd fail.

Isn't a format that has its directory at the end about as
streaming-UNfriendly as you can get?  You need to pull the whole thing
down before you can take it apart.  With a .tar.gz, you can unpack
files as they arrive.

 Eric


Re: [whatwg] Multiple file download

2010-03-10 Thread Boris Zbarsky

On 3/10/10 12:51 PM, Eric Uhrhane wrote:

the zip format is fairly streaming friendly, the directory is at the
end of the file. And if you're actually generating a file which has so
many records that you can't remember all of them, you're probably
trying to attack my user agent, so I'm quite happy that you'd fail.


Isn't a format that has its directory at the end about as
streaming-UNfriendly as you can get?  You need to pull the whole thing
down before you can take it apart.  With a .tar.gz, you can unpack
files as they arrive.


That depends on whether you're the producer or the consumer.  Given a 
format that has a directory (which is an assumption, of course), it's 
easier to consume as a stream if the directory is at the beginning and 
easier to produce as a stream if the directory is at the end.


-Boris


Re: [whatwg] Multiple file download

2010-03-10 Thread Philip Taylor
On Wed, Mar 10, 2010 at 5:51 PM, Eric Uhrhane er...@google.com wrote:
 On Wed, Mar 10, 2010 at 12:28 AM, timeless timel...@gmail.com wrote:
 http://www.pkware.com/documents/casestudies/APPNOTE.TXT V. General
 Format of a .ZIP file

 the zip format is fairly streaming friendly, the directory is at the
 end of the file. And if you're actually generating a file which has so
 many records that you can't remember all of them, you're probably
 trying to attack my user agent, so I'm quite happy that you'd fail.

 Isn't a format that has its directory at the end about as
 streaming-UNfriendly as you can get?  You need to pull the whole thing
 down before you can take it apart.  With a .tar.gz, you can unpack
 files as they arrive.

Each file's compressed data is preceded with a header with enough
information to decompress it (filename etc), and then that information
is duplicated in the central directory at the end, so I believe you
can still do streaming decompression (as well as doing random access
once you've got the directory). And you can still do streaming
compression without even buffering a single file, by setting a flag
and moving a part of the file header (lengths and checksum) to just
after the compressed file data.

(But I never understood why pkunzip asked me to put in the last floppy
disk of a multi-disk zip before it would start decompressing the first
- maybe there's some reason that streaming decompression doesn't quite
work perfectly in practice?)

-- 
Philip Taylor
exc...@gmail.com


Re: [whatwg] Multiple file download

2010-02-25 Thread Aryeh Gregor
On Tue, Feb 23, 2010 at 11:03 PM, Ashley Sheridan
a...@ashleysheridan.co.uk wrote:
 Ideally I guess then, the browsers would support .tar.gz files as these give 
 much better compression than .zip.

ZIP and gzip give comparable compression, in my experience.  I just
applied both to a random 3.5M text file lying around in /tmp, and got
exactly 170K for both.  bzip2, 7-Zip, and xz tend to give better
compression.


Re: [whatwg] Multiple file download

2010-02-25 Thread Ashley Sheridan
On Thu, 2010-02-25 at 19:13 -0500, Aryeh Gregor wrote:

 On Tue, Feb 23, 2010 at 11:03 PM, Ashley Sheridan
 a...@ashleysheridan.co.uk wrote:
  Ideally I guess then, the browsers would support .tar.gz files as these 
  give much better compression than .zip.
 
 ZIP and gzip give comparable compression, in my experience.  I just
 applied both to a random 3.5M text file lying around in /tmp, and got
 exactly 170K for both.  bzip2, 7-Zip, and xz tend to give better
 compression.


I'm just going on software I download that's offered as both types of
archive. Generally, gz is the smallest. Saying that, bz2 seems to be
superior than both of them, but as it's so new, it doesn't have a
massive take-up.

Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [whatwg] Multiple file download

2010-02-25 Thread Tim Hutt
gzip and zip both use the same algorithm which is called DEFLATE. For a
single file they will give exactly the same results. tar.gz has a slight
advantage for multiple files because it treats them as one big file. That's
called 'solid compression'. However it does mean that in order to do
anything with tar.gz, including just seeing what's inside it you have to
decompress all of it first. That's a massive disadvantage. Zip is also much
more widely supported, and it doesn't suffer from the annoying 'archive with
an archive' thing.

Anyway, I think providing multiple file downloads in a zip is fine - is
anyone really complaining?

On 26 February 2010 00:13, Ashley Sheridan a...@ashleysheridan.co.uk wrote:

  On Thu, 2010-02-25 at 19:13 -0500, Aryeh Gregor wrote:

 On Tue, Feb 23, 2010 at 11:03 PM, Ashley Sheridan
 a...@ashleysheridan.co.uk wrote:
  Ideally I guess then, the browsers would support .tar.gz files as these 
  give much better compression than .zip.

 ZIP and gzip give comparable compression, in my experience.  I just
 applied both to a random 3.5M text file lying around in /tmp, and got
 exactly 170K for both.  bzip2, 7-Zip, and xz tend to give better
 compression.


 I'm just going on software I download that's offered as both types of
 archive. Generally, gz is the smallest. Saying that, bz2 seems to be
 superior than both of them, but as it's so new, it doesn't have a massive
 take-up.

   Thanks,
 Ash
 http://www.ashleysheridan.co.uk





Re: [whatwg] Multiple file download

2010-02-25 Thread Jose Fandos
On Fri, Feb 26, 2010 at 12:57 AM, Tim Hutt tdh...@gmail.com wrote:

 gzip and zip both use the same algorithm which is called DEFLATE. For a
 single file they will give exactly the same results. tar.gz has a slight
 advantage for multiple files because it treats them as one big file. That's
 called 'solid compression'. However it does mean that in order to do
 anything with tar.gz, including just seeing what's inside it you have to
 decompress all of it first. That's a massive disadvantage. Zip is also much
 more widely supported, and it doesn't suffer from the annoying 'archive with
 an archive' thing.

 Anyway, I think providing multiple file downloads in a zip is fine - is
 anyone really complaining?


Er... sure. It is not as convenient for certain web apps when compared to
desktop apps. With this supported, the gap get's reduced.


Re: [whatwg] Multiple file download

2010-02-23 Thread Ashley Sheridan
On Tue, 2010-02-23 at 10:10 +, Jose Fandos wrote:

 Currently there are implementations allowing multiple file upload
 without the need for flash or java applets.
 
 
 
 What doesn't seem to be there, unless a java applet is used (haven't
 come across one using flash) is the multiple file download. Even
 Google Docs uses a zip file to download multiple files.
 
 
 Was wondering if this could be made part of the standard. If something
 like resource packages were used, the server would still be sending
 one file which could be heavily compressed, letting the UA to
 decompress and display as if a bunch of files had been downloaded
 separately.
 
 
 /J

Do any browsers support the resource packages link you gave?

As for multiple file download in the manner you describe, that would
require some pretty big changes to the http protocol as far as I can
tell, as it is there that this sort of thing is handled.

Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [whatwg] Multiple file download

2010-02-23 Thread Jose Fandos
On Tue, Feb 23, 2010 at 10:33 AM, Ashley Sheridan
a...@ashleysheridan.co.ukwrote:

  On Tue, 2010-02-23 at 10:10 +, Jose Fandos wrote:

 Currently there are implementations allowing multiple file upload without
 the need for flash or java applets.

  What doesn't seem to be there, unless a java applet is used (haven't come
 across one using flash) is the multiple file download. Even Google Docs uses
 a zip file to download multiple files.

  Was wondering if this could be made part of the standard. If something
 like resource packages http://limi.net/articles/resource-packages/ were
 used, the server would still be sending one file which could be heavily
 compressed, letting the UA to decompress and display as if a bunch of files
 had been downloaded separately.

  /J


 Do any browsers support the resource packages link you gave?


I don't know but don't think any browser does just yet. From the link I
gave, it is just being specified.


 As for multiple file download in the manner you describe, that would
 require some pretty big changes to the http protocol as far as I can tell,
 as it is there that this sort of thing is handled.


The resource packages specification is doing in my eyes exactly that.
Allowing scripting to select files to put in a resource-type package and
having the browser uncompress and save to disk (like a regular download)
rather than processing them to render the page would allow this without any
big changes, as long as resource packages makes it through.

/J



   Thanks,
 Ash
 http://www.ashleysheridan.co.uk





-- 
Jose Fandos
CEO

Andekan LLC
5727 Claremont Avenue
Oakland, CA 94618

Phone: 415.366.7755
Fax: 415.373.3858

UK: +44 797 198 7757
www.andekan.com


Re: [whatwg] Multiple file download

2010-02-23 Thread Boris Zbarsky

On 2/23/10 5:10 AM, Jose Fandos wrote:

What doesn't seem to be there, unless a java applet is used (haven't
come across one using flash) is the multiple file download. Even Google
Docs uses a zip file to download multiple files.


What do you mean in terms of multiple file download?

You can do this right now in two ways:

1)  An archive file (your zip example) with the files in it.
2)  A multipart response with the files as parts, each part having
Content-Disposition: attachment.

You can gzip this multipart response to get the compression behavior you 
want.


-Boris



Re: [whatwg] Multiple file download

2010-02-23 Thread Jose Fandos
On Tue, Feb 23, 2010 at 5:07 PM, Boris Zbarsky bzbar...@mit.edu wrote:

 On 2/23/10 5:10 AM, Jose Fandos wrote:

 What doesn't seem to be there, unless a java applet is used (haven't
 come across one using flash) is the multiple file download. Even Google
 Docs uses a zip file to download multiple files.


 What do you mean in terms of multiple file download?


Download 10 files as 10 separate files, without having to

a) Okay the saving of each file to your drive independently
b) Downloading them as a zip file that then needs to be uncompressed by the
end user

Imagine a list of files showing on a website (like google docs, or like you
would have in a default ftp listing in firefox). Scripting would allow a
selection of a number of these files and a download button would open a
dialog on the UA to select the folder where the files will be copied to.

You can do this right now in two ways:

 1)  An archive file (your zip example) with the files in it.


This is b) which we have, agreed, but not what I meant by allowing multiple
file download. It's allowing the download of just one file, the zip file.


 2)  A multipart response with the files as parts, each part having
Content-Disposition: attachment.


as far as I know, and I could be wrong, this would suffer from what I
described in a), i.e. there would be a dialog propping up to accept each
downloaded file.


 You can gzip this multipart response to get the compression behavior you
 want.


I was suggesting the resource packages as a way to make use of
compression/decompression.

/J




 -Boris




-- 
Jose Fandos
CEO

Andekan LLC
5727 Claremont Avenue
Oakland, CA 94618

Phone: 415.366.7755
Fax: 415.373.3858

UK: +44 797 198 7757
www.andekan.com


Re: [whatwg] Multiple file download

2010-02-23 Thread Ashley Sheridan
On Tue, 2010-02-23 at 18:12 +, Jose Fandos wrote:
 On Tue, Feb 23, 2010 at 5:07 PM, Boris Zbarsky bzbar...@mit.edu
 wrote:
 
 On 2/23/10 5:10 AM, Jose Fandos wrote:
 
 What doesn't seem to be there, unless a java applet is
 used (haven't
 come across one using flash) is the multiple file
 download. Even Google
 Docs uses a zip file to download multiple files.
 
 
 
 
 What do you mean in terms of multiple file download?
 
 
 
 Download 10 files as 10 separate files, without having to
 
 
 a) Okay the saving of each file to your drive independently
 b) Downloading them as a zip file that then needs to be uncompressed
 by the end user
 
 
 Imagine a list of files showing on a website (like google docs, or
 like you would have in a default ftp listing in firefox). Scripting
 would allow a selection of a number of these files and a download
 button would open a dialog on the UA to select the folder where the
 files will be copied to.
 
 
 
 You can do this right now in two ways:
 
 1)  An archive file (your zip example) with the files in it.
 
 
 
 This is b) which we have, agreed, but not what I meant by allowing
 multiple file download. It's allowing the download of just one file,
 the zip file.
  
 
 2)  A multipart response with the files as parts, each part
 having
Content-Disposition: attachment.
 
 
 
 as far as I know, and I could be wrong, this would suffer from what I
 described in a), i.e. there would be a dialog propping up to accept
 each downloaded file.
  
 
 You can gzip this multipart response to get the compression
 behavior you want.
 
 
 
 I was suggesting the resource packages as a way to make use of
 compression/decompression.
 
 
 /J
 
 
  
 
 
 -Boris
 
 
 
 
 
 -- 
 Jose Fandos
 CEO
 
 Andekan LLC
 5727 Claremont Avenue
 Oakland, CA 94618
 
 Phone: 415.366.7755
 Fax: 415.373.3858
 
 UK: +44 797 198 7757
 www.andekan.com


So how would you decide where each file goes? Would you just pick a
directory and it chucks all the files in there? Also, the genius of
archive files (zip, tar, rar) is that you can specify a path within the
archive, so that a collection of files which requires a certain
structure (a web page and its assets) are retained. Most operating
systems have built-in features to read into these files as if they
weren't archives at all. Windows can only do this for zip files, Linux
can do it for most archive types, not sure about MacOS or other OS's.

Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [whatwg] Multiple file download

2010-02-23 Thread Tim Hutt
On 23 February 2010 18:12, Jose Fandos iaminlon...@gmail.com wrote:
 2)  A multipart response with the files as parts, each part having
    Content-Disposition: attachment.

 as far as I know, and I could be wrong, this would suffer from what I
 described in a), i.e. there would be a dialog propping up to accept each
 downloaded file.

So wouldn't the solution simply be to modify this behaviour? I'm sure
one could write a patch for at least Firefox and Chrome to detect this
situation and ask for a destination for all files...


Re: [whatwg] Multiple file download

2010-02-23 Thread Boris Zbarsky

On 2/23/10 1:12 PM, Jose Fandos wrote:

2)  A multipart response with the files as parts, each part having
Content-Disposition: attachment.


as far as I know, and I could be wrong, this would suffer from what I
described in a), i.e. there would be a dialog propping up to accept each
downloaded file.


Currently yes, but that seems like a UI issue, not a spec issue. 
Nothing _requires_ that behavior of UAs.


I'd prefer just having a header in multipart responses to flag that all 
the files should probably be saved to the same location, or fixing UAs 
to only prompt once, to inventing yet another package format here.


-Boris


Re: [whatwg] Multiple file download

2010-02-23 Thread Diogo Resende
What about 10K files to download? I don't like this idea. One could
create a multiple file download page that could flood the client host. I
would like to see the list of files I'm going to download before
choosing save destination.
For multiple download, I would prefer a dragdrop usability (just like
for uploading).

-- 
Diogo Resende drese...@thinkdigital.pt
ThinkDigital

On Tue, 2010-02-23 at 18:12 +, Jose Fandos wrote:
 On Tue, Feb 23, 2010 at 5:07 PM, Boris Zbarsky bzbar...@mit.edu
 wrote:
 On 2/23/10 5:10 AM, Jose Fandos wrote:
 What doesn't seem to be there, unless a java applet is
 used (haven't
 come across one using flash) is the multiple file
 download. Even Google
 Docs uses a zip file to download multiple files.
 
 
 What do you mean in terms of multiple file download?
 
 
 Download 10 files as 10 separate files, without having to
 
 
 a) Okay the saving of each file to your drive independently
 b) Downloading them as a zip file that then needs to be uncompressed
 by the end user
 
 
 Imagine a list of files showing on a website (like google docs, or
 like you would have in a default ftp listing in firefox). Scripting
 would allow a selection of a number of these files and a download
 button would open a dialog on the UA to select the folder where the
 files will be copied to.
 
 
 You can do this right now in two ways:
 
 1)  An archive file (your zip example) with the files in it.
 
 
 This is b) which we have, agreed, but not what I meant by allowing
 multiple file download. It's allowing the download of just one file,
 the zip file.
  
 2)  A multipart response with the files as parts, each part
 having
Content-Disposition: attachment.
 
 
 as far as I know, and I could be wrong, this would suffer from what I
 described in a), i.e. there would be a dialog propping up to accept
 each downloaded file.
  
 You can gzip this multipart response to get the compression
 behavior you want.
 
 
 I was suggesting the resource packages as a way to make use of
 compression/decompression.
 
 
 /J
 
 
  
 
 -Boris
 
 
 
 
 -- 
 Jose Fandos
 CEO
 
 Andekan LLC
 5727 Claremont Avenue
 Oakland, CA 94618
 
 Phone: 415.366.7755
 Fax: 415.373.3858
 
 UK: +44 797 198 7757
 www.andekan.com


smime.p7s
Description: S/MIME cryptographic signature


Re: [whatwg] Multiple file download

2010-02-23 Thread Jonas Sicking
On Tue, Feb 23, 2010 at 10:45 AM, Boris Zbarsky bzbar...@mit.edu wrote:
 On 2/23/10 1:12 PM, Jose Fandos wrote:

    2)  A multipart response with the files as parts, each part having
    Content-Disposition: attachment.


 as far as I know, and I could be wrong, this would suffer from what I
 described in a), i.e. there would be a dialog propping up to accept each
 downloaded file.

 Currently yes, but that seems like a UI issue, not a spec issue. Nothing
 _requires_ that behavior of UAs.

 I'd prefer just having a header in multipart responses to flag that all the
 files should probably be saved to the same location, or fixing UAs to only
 prompt once, to inventing yet another package format here.

Indeed, if this can be fixed with no changes to specs that would be ideal.

For a multipart response it seems like the UA is free to prompt in any
way it sees fit. However one problem with a multipart response is that
the UA doesn't know the number of files, or their types and sizes,
until all files have been downloaded, right? If there was a way to
indicate this information up front then I think we're good to go.

/ Jonas


Re: [whatwg] Multiple file download

2010-02-23 Thread Jose Fandos
On Tue, Feb 23, 2010 at 6:13 PM, Ashley Sheridan
a...@ashleysheridan.co.ukwrote:

  On Tue, 2010-02-23 at 18:12 +, Jose Fandos wrote:

 On Tue, Feb 23, 2010 at 5:07 PM, Boris Zbarsky bzbar...@mit.edu wrote:

  On 2/23/10 5:10 AM, Jose Fandos wrote:

 What doesn't seem to be there, unless a java applet is used (haven't
 come across one using flash) is the multiple file download. Even Google
 Docs uses a zip file to download multiple files.

   What do you mean in terms of multiple file download?

  Download 10 files as 10 separate files, without having to

  a) Okay the saving of each file to your drive independently

  b) Downloading them as a zip file that then needs to be uncompressed by
 the end user

  Imagine a list of files showing on a website (like google docs, or like
 you would have in a default ftp listing in firefox). Scripting would allow a
 selection of a number of these files and a download button would open a
 dialog on the UA to select the folder where the files will be copied to.

  You can do this right now in two ways:

 1)  An archive file (your zip example) with the files in it.

  This is b) which we have, agreed, but not what I meant by allowing
 multiple file download. It's allowing the download of just one file, the zip
 file.

  2)  A multipart response with the files as parts, each part having
Content-Disposition: attachment.

  as far as I know, and I could be wrong, this would suffer from what I
 described in a), i.e. there would be a dialog propping up to accept each
 downloaded file.

  You can gzip this multipart response to get the compression behavior you
 want.

  I was suggesting the resource packages as a way to make use of
 compression/decompression.

  /J

 -Boris

 So how would you decide where each file goes? Would you just pick a
 directory and it chucks all the files in there?


Yes, that would be the most common use. Allowing for choosing several
different folders for different files would be left up to the UA. I don't
thing the UA should bother with that, though; the waste of time to select a
different folder for different sets of files negates the benefits of
downloading 15 files in one go as 15 distinct files.


 Also, the genius of archive files (zip, tar, rar) is that you can specify a
 path within the archive, so that a collection of files which requires a
 certain structure (a web page and its assets) are retained.


Agreed that's one benefit of archived files, but I'm looking for a more
general use that's common within the desktop os yet it cannot be reproduced
easily over a web app, namely copy a select set of file from here (website)
to there (a folder in your desktop) without having to resort to
decompression of archives.


 Most operating systems have built-in features to read into these files as
 if they weren't archives at all.


Agreed, but it only goes so far. Mac OS doesn't, not natively, as far as I
can see. I remember Windows did, but only for the file you were opening. If
you opened a program to read a file from within the zip and that file
depended on another file also in the zip, it wouldn't work. But that might
have been fixed long ago. Still, this is a request I get often enough from
non-technical people. We are covering this with a Java applet, but that
brings its own set of issues.

/J

Windows can only do this for zip files, Linux can do it for most archive
 types, not sure about MacOS or other OS's.


   Thanks,
 Ash
 http://www.ashleysheridan.co.uk



Re: [whatwg] Multiple file download

2010-02-23 Thread Jose Fandos
On Tue, Feb 23, 2010 at 6:19 PM, Tim Hutt tdh...@gmail.com wrote:

 On 23 February 2010 18:12, Jose Fandos iaminlon...@gmail.com wrote:
  2)  A multipart response with the files as parts, each part having
 Content-Disposition: attachment.
 
  as far as I know, and I could be wrong, this would suffer from what I
  described in a), i.e. there would be a dialog propping up to accept each
  downloaded file.

 So wouldn't the solution simply be to modify this behaviour? I'm sure
 one could write a patch for at least Firefox and Chrome to detect this
 situation and ask for a destination for all files...


It definitely would cover our needs, as long as everyone was using one of
those browsers. Only benefit of it being part of the spec is that eventually
it might be supported by every UA out there.


Re: [whatwg] Multiple file download

2010-02-23 Thread Jose Fandos
On Tue, Feb 23, 2010 at 6:45 PM, Boris Zbarsky bzbar...@mit.edu wrote:

 On 2/23/10 1:12 PM, Jose Fandos wrote:

2)  A multipart response with the files as parts, each part having
Content-Disposition: attachment.

 as far as I know, and I could be wrong, this would suffer from what I
 described in a), i.e. there would be a dialog propping up to accept each
 downloaded file.


 Currently yes, but that seems like a UI issue, not a spec issue. Nothing
 _requires_ that behavior of UAs.

 I'd prefer just having a header in multipart responses to flag that all the
 files should probably be saved to the same location, or fixing UAs to only
 prompt once, to inventing yet another package format here.


I shall file in a bug in bugzilla if there is none covering this already.
But would it be too much of a stretch to use the same package format and
almost the same process as the one defined for resource packages, in case
that gets into the spec? Again, because this would eventually get taken up
by everyone following the standard.

/J



 -Boris



Re: [whatwg] Multiple file download

2010-02-23 Thread Jose Fandos
On Tue, Feb 23, 2010 at 9:11 PM, Jonas Sicking jo...@sicking.cc wrote:

 On Tue, Feb 23, 2010 at 10:45 AM, Boris Zbarsky bzbar...@mit.edu wrote:
  On 2/23/10 1:12 PM, Jose Fandos wrote:
 
 2)  A multipart response with the files as parts, each part having
 Content-Disposition: attachment.
 
 
  as far as I know, and I could be wrong, this would suffer from what I
  described in a), i.e. there would be a dialog propping up to accept each
  downloaded file.
 
  Currently yes, but that seems like a UI issue, not a spec issue. Nothing
  _requires_ that behavior of UAs.
 
  I'd prefer just having a header in multipart responses to flag that all
 the
  files should probably be saved to the same location, or fixing UAs to
 only
  prompt once, to inventing yet another package format here.

 Indeed, if this can be fixed with no changes to specs that would be ideal.

 For a multipart response it seems like the UA is free to prompt in any
 way it sees fit. However one problem with a multipart response is that
 the UA doesn't know the number of files, or their types and sizes,
 until all files have been downloaded, right? If there was a way to
 indicate this information up front then I think we're good to go.

 / Jonas


Definitely a step in the right direction. I'll file a bug for Firefox...
what about Chrome/Safari/Opera?

/J


Re: [whatwg] Multiple file download

2010-02-23 Thread Jonas Sicking
On Tue, Feb 23, 2010 at 1:27 PM, Jose Fandos iaminlon...@gmail.com wrote:
 On Tue, Feb 23, 2010 at 6:19 PM, Tim Hutt tdh...@gmail.com wrote:

 On 23 February 2010 18:12, Jose Fandos iaminlon...@gmail.com wrote:
  2)  A multipart response with the files as parts, each part having
     Content-Disposition: attachment.
 
  as far as I know, and I could be wrong, this would suffer from what I
  described in a), i.e. there would be a dialog propping up to accept each
  downloaded file.

 So wouldn't the solution simply be to modify this behaviour? I'm sure
 one could write a patch for at least Firefox and Chrome to detect this
 situation and ask for a destination for all files...

 It definitely would cover our needs, as long as everyone was using one of
 those browsers. Only benefit of it being part of the spec is that eventually
 it might be supported by every UA out there.

As a browser developer, I can tell you that I'm not more likely to
implement a certain UI just because it's spelled out in a spec.
Browsers implement things that are useful for its users, not because a
spec asks nicely.

File bugs on browsers. Talk to websites to start using this. If you
build it, they will come.

/ Jonas


Re: [whatwg] Multiple file download

2010-02-23 Thread Ashley Sheridan
On Tue, 2010-02-23 at 21:27 +, Jose Fandos wrote:
 On Tue, Feb 23, 2010 at 6:19 PM, Tim Hutt tdh...@gmail.com wrote:
 
 On 23 February 2010 18:12, Jose Fandos iaminlon...@gmail.com
 wrote:
  2)  A multipart response with the files as parts, each part
 having
 Content-Disposition: attachment.
 
  as far as I know, and I could be wrong, this would suffer
 from what I
  described in a), i.e. there would be a dialog propping up to
 accept each
  downloaded file.
 
 
 
 So wouldn't the solution simply be to modify this behaviour?
 I'm sure
 one could write a patch for at least Firefox and Chrome to
 detect this
 situation and ask for a destination for all files...
 
 
 It definitely would cover our needs, as long as everyone was using one
 of those browsers. Only benefit of it being part of the spec is that
 eventually it might be supported by every UA out there.
 


I still don't think it's part of any html spec, but the http protocol.
Just because a web browser will typically be the UA dealing with it does
not necessarily mean it's something that should be dealt with in an html
spec.

Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [whatwg] Multiple file download

2010-02-23 Thread And Clover

Boris Zbarsky wrote:


or fixing UAs to only prompt once, to inventing yet another package format here.


I'd go further: why not just give UAs an option to decompress a ZIP 
archive (or potentially other recognised archive format) to multiple 
files (or a folder containing them)?


This would require no standards work and would be of general utility for 
all existing file downloads (I'd certainly be happy to shed a few clicks 
from the ZIP download-open-extract-delete shuffle).


--
And Clover
mailto:a...@doxdesk.com
http://www.doxdesk.com/



Re: [whatwg] Multiple file download

2010-02-23 Thread Ashley Sheridan
On Wed, 2010-02-24 at 00:02 +0100, And Clover wrote:

 Boris Zbarsky wrote:
 
  or fixing UAs to only prompt once, to inventing yet another package format 
  here.
 
 I'd go further: why not just give UAs an option to decompress a ZIP 
 archive (or potentially other recognised archive format) to multiple 
 files (or a folder containing them)?
 
 This would require no standards work and would be of general utility for 
 all existing file downloads (I'd certainly be happy to shed a few clicks 
 from the ZIP download-open-extract-delete shuffle).
 


That's probably the smartest way to go about it. Won't break anything,
just enhances the user experience that you'd normally get.

Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [whatwg] Multiple file download

2010-02-23 Thread Jose Fandos
On Tue, Feb 23, 2010 at 9:51 PM, Jonas Sicking jo...@sicking.cc wrote:

 On Tue, Feb 23, 2010 at 1:27 PM, Jose Fandos iaminlon...@gmail.com
 wrote:
  On Tue, Feb 23, 2010 at 6:19 PM, Tim Hutt tdh...@gmail.com wrote:
 
  On 23 February 2010 18:12, Jose Fandos iaminlon...@gmail.com wrote:
   2)  A multipart response with the files as parts, each part having
  Content-Disposition: attachment.
  
   as far as I know, and I could be wrong, this would suffer from what I
   described in a), i.e. there would be a dialog propping up to accept
 each
   downloaded file.
 
  So wouldn't the solution simply be to modify this behaviour? I'm sure
  one could write a patch for at least Firefox and Chrome to detect this
  situation and ask for a destination for all files...
 
  It definitely would cover our needs, as long as everyone was using one of
  those browsers. Only benefit of it being part of the spec is that
 eventually
  it might be supported by every UA out there.

 As a browser developer, I can tell you that I'm not more likely to
 implement a certain UI just because it's spelled out in a spec.
 Browsers implement things that are useful for its users, not because a
 spec asks nicely.


I meant the implementation/re-use of a package format being part of the
standard more than the UI. Though I'm happy to follow-up on the UI
implementations.

I had filed a bug for mozilla (bug
537669https://bugzilla.mozilla.org/show_bug.cgi?id=537669) on
this at the beginning of the year. It stands unconfirmed. If anyone can
confirm the bug, that would be swell.

I'll attach a test case to the bugs to show the multiple dialogs currently
showing.

I'm submitting the bug at bugs.webkit.org as soon as I get the account
ready.

Already submitted bug report to Opera.

/J


 File bugs on browsers. Talk to websites to start using this. If you
 build it, they will come.

 / Jonas



Re: [whatwg] Multiple file download

2010-02-23 Thread Brian Campbell
On Feb 23, 2010, at 6:02 PM, And Clover wrote:

 Boris Zbarsky wrote:
 
 or fixing UAs to only prompt once, to inventing yet another package format 
 here.
 
 I'd go further: why not just give UAs an option to decompress a ZIP archive 
 (or potentially other recognised archive format) to multiple files (or a 
 folder containing them)?

Some UAs already have this feature. In Safari, if you have the 'Open safe 
files after downloading' option enabled (I believe it's enabled by default, 
though I usually leave it disabled because there have been a few exploits 
contained in supposedly safe files), it will unpack your ZIP or .tar.gz 
archives, and delete the archive leaving only the resulting folder. 

 This would require no standards work and would be of general utility for all 
 existing file downloads (I'd certainly be happy to shed a few clicks from the 
 ZIP download-open-extract-delete shuffle).

Yep, there's nothing stopping browsers from implementing this, and there are 
already browser that do it. It's just a matter of encouraging other browser 
vendors to follow suit.

-- Brain

Re: [whatwg] Multiple file download

2010-02-23 Thread Ashley Sheridan
On Tue, 2010-02-23 at 22:50 -0500, Brian Campbell wrote:

 On Feb 23, 2010, at 6:02 PM, And Clover wrote:
 
  Boris Zbarsky wrote:
  
  or fixing UAs to only prompt once, to inventing yet another package format 
  here.
  
  I'd go further: why not just give UAs an option to decompress a ZIP archive 
  (or potentially other recognised archive format) to multiple files (or a 
  folder containing them)?
 
 Some UAs already have this feature. In Safari, if you have the 'Open safe 
 files after downloading' option enabled (I believe it's enabled by default, 
 though I usually leave it disabled because there have been a few exploits 
 contained in supposedly safe files), it will unpack your ZIP or .tar.gz 
 archives, and delete the archive leaving only the resulting folder. 
 
  This would require no standards work and would be of general utility for 
  all existing file downloads (I'd certainly be happy to shed a few clicks 
  from the ZIP download-open-extract-delete shuffle).
 
 Yep, there's nothing stopping browsers from implementing this, and there are 
 already browser that do it. It's just a matter of encouraging other browser 
 vendors to follow suit.
 
 -- Brain


Ideally I guess then, the browsers would support .tar.gz files as these
give much better compression than .zip. Unfortunately, that's probably
unlikely to happen this decade with a certain browser made by a company
that is known for trying to get developers to do things their way...

Thanks,
Ash
http://www.ashleysheridan.co.uk