Hi Max. I am getting no errors. I am asking the question because I have no experience with CMFBTreeFolder and the script works fine in a regular folder or a CMF Portal folder. When images come into the uploads folder, I am resizing each into 3 sizes using PIL and moving this data into an external file type to store file on the filesystem and discarding the original file. I have this working except images are not processed immediately when they come into uploads folder - so I was looking to cronning to see if anything is in the uploads folder each 15 or 30 min. Clients will upload images from a form, FTP, or WebDAV. I did not want to give people server accounts to upload their data using scp but in the end I am going to have to get SFTPGateway product working so there is some security with this in any case. I just received Paul's message. I think he may be right on what is happening when getting the items from the folder. I think the workflow idea could be the solution to solve the immediate processing issue so will also look into this. Regards, David On Monday, February 28, 2005, at 10:46 AM, Max M wrote:
David Pratt wrote:
Hi. I am working with the CMFBTreeFolder for the first time. I thought it would make sense since I am wanting to use this type for an uploads folder. There may be thousands of objects. Once files have been uploaded to the folder, I am running a script to pull out images using a for statement like this: # Iterate over folder contents for name, obj in start_dir.objectItems(['Portal Image']): and then executing some logic on the images afterwards. I am planning to cron the script unless I can figure a way to execute the logic as files are coming into the folder (which would be the best - so any ideas here would be great).
First of. Maybe your script runs into an error, and stops. It's hard to tell without seing the script what the problem is. It's most likely not a BTreeFolder issue.
If you need to do processing on an image, you should subclass the CMF Image class, and overwrite the methods necessary for postprocessing your images. That is a better solution than a cron job.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/ IT's Mad Science
_______________________________________________ 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 )