views:

120

answers:

1

In Django I'm looking for a way to serve several different files at once. I can't use static archives (.zip, .tar, etc.) because I don't have enough storage to cache these files and it will take far too long to generate them on the fly (each could be in the 100s of megabytes).

Is there a way I can indicate to the browser that several files are coming its way? Perhaps there is a container format that I can indicate before streaming files to the user?

Edit: There could be hundreds of files in each package so asking the user to download each one is very time consuming.

+1  A: 

Ah, the .tar file format can be streamed. I'll experiment with this for now.

http://docs.python.org/library/tarfile.html

Kai