serving multiple files as a zip
brad at danga.com
Fri May 5 16:05:03 UTC 2006
We've wanted to to this for our photo hosting site for ages but have never
gotten around to it.
If you write the Perlbal plugin, I'd love it!
On Fri, 5 May 2006, alex wrote:
> It's nice to allow web users to download several files in one go. For
> example choose 5 tracks they like from an album and download a zip.
> I was wondering if this could be sensible
> 1/ User clicks on a link
> 2/ perlbal gets the request, proxies it
> 3/ apache gets the request, maps the link to five files, returns a
> reproxy header giving the relevant file locations
> 4/ perlbal serves the files back to the user, combined into an
> uncompressed application/zip file
> Step four wouldn't require any extra memory or disk usage, latency or
> cpu. Zip files can be streamed as they're constructed. It's possible
> to predict the size of zip files and its parts in advance by doing a
> HEAD request for each part and adding on header size, so byte range
> support can work.
> So, a good idea? I can share some potentially useful code if so, I've
> got this kind of zip file streaming working in Perl already with a
> subclass of Archive::Zip::Member.
More information about the perlbal