[Zope] webdav upload - controlling type, hook

Jakob Schou Jensen schou.temp.1 at gmail.com
Sat Oct 11 09:57:38 EDT 2008


Thanks Tres,

The PUT_factory works fine for controlling the upload type. In addition to
this I need a hook that gets called whenever a document is created OR
updated (the put_factory is only called on creation). I need this hook to
update some derived/cached data. Is there any way to do this?

Jakob

2008/9/25 Tres Seaver <tseaver at palladion.com>

>
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Jakob Schou Jensen wrote:
> > When uploading a file to the zope db using the webdav interface zope
> select
> > on object type based on the file contents (or extension?). For instance
> when
> > I upload a html file it becomes a DTML document. Is there any way to
> control
> > what type of object is selected?
> >
> > Additionally I would like to execute some script code after a webdav
> upload.
> > Is there any way to get a hook or callback or something similar?
>
> You need to implement the 'PUT_factory' hook for your container:
>
>  http://wiki.zope.org/zope2/PUTFactory
>
>
> Tres.
> - --
> ===================================================================
> Tres Seaver          +1 540-429-0999          tseaver at palladion.com
> Palladion Software   "Excellence by Design"    http://palladion.com
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFI2+lV+gerLs4ltQ4RAkEAAJ9vdWXskaVEB4IJAjFnxJc9HQ7K8ACgiCBy
> 7oWAtfQCkvyVKHfQ3B6NQzA=
> =uAf+
> -----END PGP SIGNATURE-----
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20081011/7f224395/attachment.html 


More information about the Zope mailing list