It seems that all I have to do is add the line:

self.portal_repository.save(new_file, comment='saved programmatically !')

That is what I was looking for.





cswank wrote:
> 
> Hello,
> I need to save a piece of content as a new revision when its file field is
> modified with new data.  The modifying of the data in the file field
> happens programmatically:
> 
> new_file = self._get_file(campaign_folder, file_title)
> f = open(file_path, 'rb')
> data = f.read()
> f.close()
> new_file.setFile(data)
> 
> 
> and I can't find an interface to plone versioning of content.
> 
> Can anyone point me in the right direction?
> 
> Thanks,
> 
> Craig
> 

-- 
View this message in context: 
http://n2.nabble.com/Programmatic-versioning-tp2685591p2685645.html
Sent from the Product Developers mailing list archive at Nabble.com.


_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to