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

Paulo Eduardo Neves neves@inf.puc-rio.br
Wed, 03 Feb 1999 23:02:34 -0300


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. 

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. 

	As you can see the default extension is .ztml (I liked it!). The mime
type is text/ztml. If you want to change to dtml it is just a char in
the code.

regards,
-- 
Paulo Eduardo Neves
PUC-Rio de Janeiro 
Pager: Central: 292-4499 cod. 213 99 64
ou use a URL:  http://www.learn.fplf.org.br/neves/mensagempager.html