[Zope] creating a file on a client

Dieter Maurer dieter@handshake.de
Wed, 21 Mar 2001 21:57:07 +0100 (CET)


Tom Deprez writes:
 > Is this possible? How can I let Zope put a file on a clients directory
 > (through python.?)
Zope (and its python) live on the server. They can not reach your
client directory (without the help from a program on your client).

Your options:

  *  set a content type in the generated file that tells the
     browser that the file should be stored and not shown, e.g.:

       <dtml-call "RESPONSE.setHeader('Content-Type','application')">

     The browser will in this case pop up a file dialog where
     you can specify where to put the file.

  *  Use a Python script (e.g. ZPublisher.Client) on your client
     to fetch the file and store it

  *  Write some Java applet that fetch the file and stores it.

     You will need to give it high permissions
     (you probably will need to sign it), such that
     it is able to write to your local file system.

     For obvious security reasons, normal Java applets
     are not allowed to write to your file system.


Dieter