<div dir="ltr">Thanks Tres,<br><br>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?<br>
<br>Jakob<br><br><div class="gmail_quote">2008/9/25 Tres Seaver <span dir="ltr">&lt;<a href="mailto:tseaver@palladion.com">tseaver@palladion.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<div><div></div><div class="Wj3C7c"><br>
Jakob Schou Jensen wrote:<br>
&gt; When uploading a file to the zope db using the webdav interface zope select<br>
&gt; on object type based on the file contents (or extension?). For instance when<br>
&gt; I upload a html file it becomes a DTML document. Is there any way to control<br>
&gt; what type of object is selected?<br>
&gt;<br>
&gt; Additionally I would like to execute some script code after a webdav upload.<br>
&gt; Is there any way to get a hook or callback or something similar?<br>
<br>
</div></div>You need to implement the &#39;PUT_factory&#39; hook for your container:<br>
<br>
 &nbsp;<a href="http://wiki.zope.org/zope2/PUTFactory" target="_blank">http://wiki.zope.org/zope2/PUTFactory</a><br>
<br>
<br>
Tres.<br>
- --<br>
===================================================================<br>
Tres Seaver &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+1 540-429-0999 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="mailto:tseaver@palladion.com">tseaver@palladion.com</a><br>
Palladion Software &nbsp; &quot;Excellence by Design&quot; &nbsp; &nbsp;<a href="http://palladion.com" target="_blank">http://palladion.com</a><br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.6 (GNU/Linux)<br>
Comment: Using GnuPG with Mozilla - <a href="http://enigmail.mozdev.org" target="_blank">http://enigmail.mozdev.org</a><br>
<br>
iD8DBQFI2+lV+gerLs4ltQ4RAkEAAJ9vdWXskaVEB4IJAjFnxJc9HQ7K8ACgiCBy<br>
7oWAtfQCkvyVKHfQ3B6NQzA=<br>
=uAf+<br>
-----END PGP SIGNATURE-----<br>
<br>
</blockquote></div><br></div>