[Erp5-report] r41123 nicolas - /erp5/trunk/products/ERP5/Document/File.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Sat Dec 4 15:53:31 CET 2010
Author: nicolas
Date: Sat Dec 4 15:53:30 2010
New Revision: 41123
URL: http://svn.erp5.org?rev=41123&view=rev
Log:
Disable feature added by recent version of OFS.Image which try to guess
the content_type by reading the id of object.
In ERP5, the content_type is reads from filename property thanks to
interaction_workflow
Modified:
erp5/trunk/products/ERP5/Document/File.py
Modified: erp5/trunk/products/ERP5/Document/File.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/File.py?rev=41123&r1=41122&r2=41123&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/File.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/File.py [utf8] Sat Dec 4 15:53:30 2010
@@ -128,6 +128,16 @@ class File(Document, CMFFile):
getcontentlength = get_size
+ def _get_content_type(*args, **kw):
+ """Override original implementation from OFS/Image.py
+ to disable content_type discovery because
+ id of object its used to read the filename value.
+ In ERP5, an interaction
+ document_conversion_interaction_workflow/Document_file,
+ update the content_type by reading filename property
+ """
+ return None
+
def _setFile(self, data, precondition=None):
if data is not None and self.hasData() and \
md5.md5(str(data.read())).digest() ==\
More information about the Erp5-report
mailing list