Hi, I'm using LocalFS to show pushed jpeg files from a PACS system. These Jpeg files are all sorted in folders (each patient has a folder) etc. Now I would like the user to be able to download a complete folder, just by clicking it on the browser. The best way to let the user download the whole folder is (I think) to first zip the folder and then let the user download the zip file. (If there are ways to download a complete folder, that's even better). Now, are there people who know of a good python library for zipping a file (.zip format) Or do people know if it is possible to download a complete folder? Thanks in advance, Regards, Tom.
Tom Deprez wrote:
Now I would like the user to be able to download a complete folder, just by clicking it on the browser. The best way to let the user download the whole folder is (I think) to first zip the folder and then let the user download the zip file.
Make sure you cache that zip file on the server so you're not wastign loads of processro tiem regenerating it all the time! ;-)
Now, are there people who know of a good python library for zipping a file (.zip format) Or do people know if it is possible to download a complete folder?
import zipfile (python 2.1+) cheers, Chris PS: You're HTML mailing ATM ;-S
Make sure you cache that zip file on the server so you're not wastign loads of processro tiem regenerating it all the time! ;-)
:-)
Now, are there people who know of a good python library for zipping a file (.zip format) Or do people know if it is possible to download a complete folder?
import zipfile (python 2.1+)
thanks
Chris
PS: You're HTML mailing ATM ;-S
Oops! Pardon me! I thought I was sending in plain text (I had set this up). Thanks for the message! If this is still an html mailing, let me know, then I've to look deeply why this is happening. Tom
On Thu, Oct 11, 2001 at 07:02:19PM +0200, Tom Deprez wrote:
Hi,
I'm using LocalFS to show pushed jpeg files from a PACS system. These Jpeg files are all sorted in folders (each patient has a folder) etc.
Now I would like the user to be able to download a complete folder, just by clicking it on the browser. The best way to let the user download the whole folder is (I think) to first zip the folder and then let the user download the zip file. (If there are ways to download a complete folder, that's even better).
Now, are there people who know of a good python library for zipping a file (.zip format) Or do people know if it is possible to download a complete folder?
I did this quite a while ago, even wrote a short note about it at http://www.zope.org/Members/janfrode/localfs_zip It's not using any zip-library, but rather calls zip directly. Hope it helps... -jf
participants (3)
-
Chris Withers -
Jan-Frode Myklebust -
Tom Deprez