demont, please do not cross-post your messages to more than one mailing list and please do not send HTML-formatted mail to the list. if the file that you want to get is supposed to be read from the filesystem of the machine your zope is running on without being uploaded by someone using a "file" form field then you cannot do this directly in DTML. Zope cannot touch the file system on the machine it runs on in arbitrary locations, think about the security risk. what you would need to do is write an external method and pass it the file path. external methods have less security restrictions and you could read the file that way and instantiate an object in the ZODB from it. jens On Wednesday, November 28, 2001, at 03:29 , Demont Maarten wrote:
Hey
I want to insert a file from my “normal” file system into the ZODB database. I have collected the path from a form-field “file”.
The file that needs inserting must be placed in a certain folder inside Zope, and gets a title that I base upon a certain number.
How can I – using DTML – insert this file?
Can anyone supply me (fast, this is quite urgent…) with a few lines of code explaining this?
Thanx!!!!!
Maarten Demont
maarten.demont@cronos.be
Zope-Newbie