[Zope] What about adding a download tab to Document?

Brian Lloyd Brian@digicool.com
Fri, 5 Feb 1999 10:06:59 -0500


> Hi,
> 	I think it would be nice to have a download tab in the document
> objects. Today we have to cut'n paste the form contents to an 
> editor and
> save it with the desired name. 
> 
> 	Probably the usual development way is to edit a doc in 
> the file system
> and to upload it. When you want to change, just edit it and upload
> again. Not very good when you have to edit a document from multiple
> places, or to edit documents that where automatically generated. 

We are definitely aware of the shortcomings of editing in
a TEXTAREA :^) A major goal of the upcoming FTP and WebDAV support
is to provide much more flexibility in editing.


> Here is a patch to do it:
> http://samba-choro.com.br/neves/python/zope/Document.py.patch
> 
> It should be applied to Document.py file in
> /web/Zope-1.9.0-src/lib/python/OFS dir. 
> 
> 	There's a kind of a hack in it to make the default file 
> name in the
> browser download dialog to become "document_id.ztml". To do this a
> method is created with this name. If someone know a better 
> way to do it,
> like a magic http header, please tell me. 

Why do you need to change the extension? Couldn't you just name
it foo.ztml in the first place?

Having a well-known method for obtaining DTML source is something
that will be needed for FTP and webdav support anyway, so we can
probably support at least a simple download tab for 1.10.0. 
The actual implementation will probably be a bit different than that in 
your patch though, as there are some ftp and webdav-specific
requirements 
that we need to meet as well, and the underlying implementation will
probably need to change later to accomodate those.

I suspect that changing the apparent id of the object won't be a
part of this (at least not initially), since this would throw most
clients for a loop...



Brian Lloyd        brian@digicool.com
Software Engineer  540.371.6909              
Digital Creations  http://www.digicool.com