[Zope] creating a file on a client

David Burton eloquence@eloquent-designs.f2s.com
Thu, 22 Mar 2001 10:07:26 -0000


Alternatively, if the client systems are using Windows (exclusively), you
could write a COM object (in Python, C++, VB, Delphi, or whatever), and
enbed this in the page instead.
This would have issues when installing, but would automatically have the
rights to access the file system.

This is a good example of the power of using COM objects in web pages, but
also of the reason why users have every cause to be wary of accepting COM
objects from untrusted sources. The result will be much the same as the Java
option.

However, if you can work with the program using the data, it would probably
be preferable to either change it so it accesses the central location
directly, or to embed a function in it that periodically retrieves the
latest version itself.

Alternatively, you could write a little program that retrieves the data from
the central data store periodically, that is installed and set to run when a
machine is started, which would probably also be a more reliable system.
Even more cunning might be a program that starts up the database program and
also checks whether that program is still running - net result, it downloads
updates when the database program is running, and closes when it's not
needed.

David

----- Original Message -----
From: "Dieter Maurer" <dieter@handshake.de>
To: "Tom Deprez" <tom.deprez@uz.kuleuven.ac.be>
Cc: <zope@zope.org>
Sent: Wednesday, March 21, 2001 8:57 PM
Subject: Re: [Zope] creating a file on a client


> 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
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )