[Zope] Upload Photo objects in a localFS
William GARCIA
wgarcia@esrf.fr
Tue, 14 May 2002 08:06:13 +0200
--=====================_1209336109==_.ALT
Content-Type: text/plain; charset="us-ascii"; format=flowed
I have a local file system named images.
I would like to write-in photo objects.
When I write an Image object with
<dtml-with images>
<dtml-call
"manage_addProduct['OFSP'].manage_addImage(REQUEST['id_img'],file,'')">
</dtml-with>
there is no problem, but when I try to write a Photo object with
<dtml-with images>
<dtml-call expr="manage_addProduct['Photo'].manage_addPhoto(id_img, '',
file)">
</dtml-with>
Zope generate the next error :
Error Type: Bad Request
Error Value: Cannot add objects of type 'Photo' to local directories.
Traceback (innermost last):
File
/zope/Zope-2.5.0-solaris-2.6-sparc/lib/python/ZPublisher/Publish.py, line
150, in publish_module
File
/zope/Zope-2.5.0-solaris-2.6-sparc/lib/python/ZPublisher/Publish.py, line
114, in publish
File /zope/Zope-2.5.0-solaris-2.6-sparc/lib/python/Zope/__init__.py,
line 159, in zpublisher_exception_hook
(Object: recherche_indexation_mysql)
File
/zope/Zope-2.5.0-solaris-2.6-sparc/lib/python/ZPublisher/Publish.py, line
98, in publish
File /zope/Zope-2.5.0-solaris-2.6-sparc/lib/python/ZPublisher/mapply.py,
line 88, in mapply
(Object: 5addImageLFS)
File
/zope/Zope-2.5.0-solaris-2.6-sparc/lib/python/ZPublisher/Publish.py, line
39, in call_object
(Object: 5addImageLFS)
File /zope/Zope-2.5.0-solaris-2.6-sparc/lib/python/OFS/DTMLMethod.py,
line 127, in __call__
(Object: 5addImageLFS)
File
/zope/Zope-2.5.0-solaris-2.6-sparc/lib/python/DocumentTemplate/DT_String.py,
line 473, in __call__
(Object: 5addImageLFS)
File
/zope/Zope-2.5.0-solaris-2.6-sparc/lib/python/DocumentTemplate/DT_With.py,
line 76, in render
(Object: images)
File
/zope/Zope-2.5.0-solaris-2.6-sparc/lib/python/DocumentTemplate/DT_Util.py,
line 159, in eval
(Object: manage_addProduct['Photo'].manage_addPhoto(id_img, '', file))
(Info: id_img)
File <string>, line 2, in f
File /zope/web/Products/Photo/Photo.py, line 655, in manage_addPhoto
File
/zope/Zope-2.4.3-solaris-2.6-sparc/lib/python/Products/LocalFS/LocalFS.py,
line 547, in _setObject
(Object: images)
File
/zope/Zope-2.4.3-solaris-2.6-sparc/lib/python/Products/LocalFS/LocalFS.py,
line 571, in _safe_setOb
(Object: images)
File
/zope/Zope-2.4.3-solaris-2.6-sparc/lib/python/Products/LocalFS/LocalFS.py,
line 586, in _setOb
(Object: images)
Bad Request: (see above)
The problem is certainly due to the fact contrarily to Image, the Photo
product isn't included in the local file system properties
If someone know how to include the Photo product in the localFS properties,
I'm sincerely interested.
Thanks in advance for the help or the ideas you can give to me.
William.
--=====================_1209336109==_.ALT
Content-Type: text/html; charset="us-ascii"
<html>
I have a local file system named images. <br>
I would like to write-in photo objects. <br>
When I write an Image object with <br>
<dtml-with images><br>
<dtml-call
"manage_addProduct['OFSP'].manage_addImage(REQUEST['id_img'],file,'')"><br>
</dtml-with> <br>
there is no problem, but when I try to write a Photo object with <br>
<dtml-with images><br>
<dtml-call
expr="manage_addProduct['Photo'].manage_addPhoto(id_img, '',
file)"><br>
</dtml-with> <br><br>
Zope generate the next error :<br>
<b>Error Type: Bad Request<br>
Error Value: Cannot add objects of type 'Photo' to local
directories.<br><br>
</b>Traceback (innermost last):<br>
File
/zope/Zope-2.5.0-solaris-2.6-sparc/lib/python/ZPublisher/Publish.py, line
150, in publish_module<br>
File
/zope/Zope-2.5.0-solaris-2.6-sparc/lib/python/ZPublisher/Publish.py, line
114, in publish<br>
File
/zope/Zope-2.5.0-solaris-2.6-sparc/lib/python/Zope/__init__.py, line 159,
in zpublisher_exception_hook<br>
(Object: recherche_indexation_mysql)<br>
File
/zope/Zope-2.5.0-solaris-2.6-sparc/lib/python/ZPublisher/Publish.py, line
98, in publish<br>
File
/zope/Zope-2.5.0-solaris-2.6-sparc/lib/python/ZPublisher/mapply.py, line
88, in mapply<br>
(Object: 5addImageLFS)<br>
File
/zope/Zope-2.5.0-solaris-2.6-sparc/lib/python/ZPublisher/Publish.py, line
39, in call_object<br>
(Object: 5addImageLFS)<br>
File
/zope/Zope-2.5.0-solaris-2.6-sparc/lib/python/OFS/DTMLMethod.py, line
127, in __call__<br>
(Object: 5addImageLFS)<br>
File
/zope/Zope-2.5.0-solaris-2.6-sparc/lib/python/DocumentTemplate/DT_String.py,
line 473, in __call__<br>
(Object: 5addImageLFS)<br>
File
/zope/Zope-2.5.0-solaris-2.6-sparc/lib/python/DocumentTemplate/DT_With.py,
line 76, in render<br>
(Object: images)<br>
File
/zope/Zope-2.5.0-solaris-2.6-sparc/lib/python/DocumentTemplate/DT_Util.py,
line 159, in eval<br>
(Object:
manage_addProduct['Photo'].manage_addPhoto(id_img, '', file))<br>
(Info: id_img)<br>
File <string>, line 2, in f<br>
File /zope/web/Products/Photo/Photo.py, line 655, in
manage_addPhoto<br>
File
/zope/Zope-2.4.3-solaris-2.6-sparc/lib/python/Products/LocalFS/LocalFS.py,
line 547, in _setObject<br>
(Object: images)<br>
File
/zope/Zope-2.4.3-solaris-2.6-sparc/lib/python/Products/LocalFS/LocalFS.py,
line 571, in _safe_setOb<br>
(Object: images)<br>
File
/zope/Zope-2.4.3-solaris-2.6-sparc/lib/python/Products/LocalFS/LocalFS.py,
line 586, in _setOb<br>
(Object: images)<br>
Bad Request: (see above)<br><br>
<br>
The problem is certainly due to the fact contrarily to Image, the Photo
product isn't included in the local file system properties<br>
If someone know how to include the Photo product in the localFS
properties, I'm sincerely interested.<br>
Thanks in advance for the help or the ideas you can give to me.<br>
William.<br>
</html>
--=====================_1209336109==_.ALT--