3 ms·
Yeah, I looked into this a while ago forgenerating photo gallery zip files on the fly. Currently I'm using lazygal to generate static html galleries and if I wa
by m4rtink 6y ago
Yeah, I looked into this a while ago forgenerating photo gallery zip files on the fly. Currently I'm using lazygal to generate static html galleries and if I want to give users the option to easoly download the full gallery, it basically doubles the size I need to store, as lazygal simply creates a zip file and puts it next to the photos and html files in the static gallery folder it generates.
So I looked to creating the zip files on the fly when requested & streaming them to the client onthe other end withou having to create temporary files and/or a lot of memmory consumption on the server. I got it working on a prototype and even found some articles from others that got it working - it is not that hard, really.
- kitotik 6y agoIt was apparently hard enough that you had to build a prototype and consult other prior write ups. When you really need something done it’s sometimes very helpful to be able quickly get it done.
- eggsnbacon1 6y agoits very easy to zip on the fly with C#, Java, JS. No idea why Python has this blind spot
- scosman 6y agoI built exactly this once. Here it is as a microservice you can deploy to heroku in 1 click: https://github.com/scosman/zipstreamer https://github.com/scosman/zipstreamer