On-the-fly creation of zip files (streaming instead of precomputing)


As far as I know Seafile first creates an on-disk zip file before transmitting it. Depending on the number and size of the chosen files and of course the performance of the server this can be very time-consuming and may even lead to timeouts on slower servers. Here’s my wish: implement on-the-fly creation of zipfiles without writing anything or at least start streaming immediately.

I’d even say that most users don’t particularly care about compression, zip download is mostly a means to download multiple files in one go. So if this feature were easier to implement without compression it could still be an interesting feature!


+1 It would be nice to see a solution here! Many customers of us complain about this!

The main problem now is that when the zip takes a lot of time, the web UI does not response.

In version 6.0, the zip task will be performed in the background and the Web UI will show a progress. Google Drive works as this too. It should satisfy most users.


+1 for direct download without compression of any directory. I just tried to click the zip-Button multiple times - each time a new compression task is started and a new temporary file is generated without cancelling the running task or even better show the status of the running task an reuse it. Looks like a huge waste of ressources.
Please just use the zip as a container without any compression and serve it on-the-fly. I think this will be faster, especially on low end hardware.


This is currently the issue. Afaik there is a bug (which is hard to solve) in a used library which prevents usage of streaming a zip on the fly.

I just want to make some noise and revive this feature request. Don’t know if serving zip archives on-the-fly is still buggy and hard to implement but it would be great if zipping files could be done with multiple threads (see pigz as a parallel gzip implementation for example). Right now it’s still done by one thread.

1 Like