[Zope] Serving Files from Filesystem
Wed, 24 Jul 2002 17:13:57 +0200
Reinoud van Leeuwen wrote:
> On Wed, Jul 24, 2002 at 02:53:46PM +0200, Thomas Guettler wrote:
>>I want to make files from the filesystem down- and uploadable
>>It is needed for a python product. No TTH editing, dtml or zpt.
>>Which products are available?
> WebDav? (in Internet Explorer: File -> open -> (enter URL and select 'Open
> as WebFolder').
> Now you have a explorer window open on your zope folder where you can drag
> and drop files
I tried WebDAV three month ago. It was not stable. The files got
read only after the first access. I think it is a bug in MS-Office.
But I just want to server a simple file. I wrote it myself, quite easy
If someone is interested:
def downloadAttachment(self, file=None, REQUEST=None):
"Download attachment 'file' to browser"
raise 'You must specify a file to download'
print "file_content: %s" % file_content[:20]
content_type, content_encoding = mimetypes.guess_type(abs_filename)
print "ct ce:", content_type, content_encoding