Hello. I am trying to add a File object to a LocalFS object with id 'test'. I am able to detect the LocalFS object within the <dtml-in> and there is only one Local FS object in this particular parent Folder object. When the manage_addFile function call is executed, the File object is added to the parent Folder object instead of the contained Local FS object. Any help would be greatly appreciated. Thanks. - Asad <dtml-in expr="aq_parent.objectValues('Local File System')" prefix="current_localFS"> <dtml-if expr="current_localFS_item.getId() == 'test'"> <dtml-call "current_localFS_item.manage_addFile(id=REQUEST.form['fileName'],file=REQUEST.form['file'],title='',precondition='',content_type='application/pdf')"> </dtml-if> </dtml-in>
Asad Habib wrote:
Hello. I am trying to add a File object to a LocalFS object with id 'test'. I am able to detect the LocalFS object within the <dtml-in> and there is only one Local FS object in this particular parent Folder object. When the manage_addFile function call is executed, the File object is added to the parent Folder object instead of the contained Local FS object. Any help would be greatly appreciated. Thanks.
LocalFS only looks somewhat like a real folder, and it cannot really hold standard objects. I guess that it might have its own constructors for content. Try and look those up. --jcc
In case you haven't solved this yet: LOCAL_FS_OBJECT.manage_upload(file = FILE, id = FILE_ID) Asad Habib wrote:
Hello. I am trying to add a File object to a LocalFS object with id 'test'. I am able to detect the LocalFS object within the <dtml-in> and there is only one Local FS object in this particular parent Folder object. When the manage_addFile function call is executed, the File object is added to the parent Folder object instead of the contained Local FS object. Any help would be greatly appreciated. Thanks.
- Asad
<dtml-in expr="aq_parent.objectValues('Local File System')" prefix="current_localFS"> <dtml-if expr="current_localFS_item.getId() == 'test'"> <dtml-call "current_localFS_item.manage_addFile(id=REQUEST.form['fileName'],file=REQUEST.form['file'],title='',precondition='',content_type='application/pdf')"> </dtml-if> </dtml-in> _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
participants (3)
-
Asad Habib -
Chris Beaven -
J Cameron Cooper