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

Paulo Eduardo Neves neves@inf.puc-rio.br
Fri, 05 Feb 1999 17:38:20 -0300


Brian Lloyd wrote:
> 
> 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.

I know, that will be great to use the remote editing feature of some
editors like emacs and homesite 4. But a download tab is nice for 2
reasons: FTP is still in alpha, and some people will not use ZServer. 

> >       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?

Take a look at the code and you will see that if the doc id finishes
with something like .?tml, the extension isn't added. The purpose to add
it is that if I edit it in emacs I can add a hook to start HTML editing
mode. The same in windows, where I can associate an extension to be
opened or edited with a program.

> 
> 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.

Nice. See that the method is already in the code, it is named
manage_realDownload.

> 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...

Excuse me, I didn't understand. The code doesn't change the object id,
it just add a method that is named after the document id. This is just
an alias of manage_realDownload. I did this to make the object id appear
in the download dialog of Netscape. BTW I didn't tested it in IE. 

[]s
-- 
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