[Erp5-report] r31690 nicolas - /erp5/trunk/products/ERP5/Document/TextDocument.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Jan 11 17:40:52 CET 2010
Author: nicolas
Date: Mon Jan 11 17:40:52 2010
New Revision: 31690
URL: http://svn.erp5.org?rev=31690&view=rev
Log:
* Try to provide original file_name for ingested documents, it can help portal_transforms
to guess original mime_type.
reviewed by romain
Modified:
erp5/trunk/products/ERP5/Document/TextDocument.py
Modified: erp5/trunk/products/ERP5/Document/TextDocument.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/TextDocument.py?rev=31690&r1=31689&r2=31690&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/TextDocument.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/TextDocument.py [utf8] Mon Jan 11 17:40:52 2010
@@ -215,9 +215,10 @@
if text_content:
if not self.hasConversion(format=format):
portal_transforms = getToolByName(self, 'portal_transforms')
+ filename = self.getSourceReference(self.getTitleOrId())
result = portal_transforms.convertToData(mime_type, text_content,
object=self, context=self,
- filename=self.getTitleOrId(),
+ filename=filename,
mimetype=src_mimetype)
if result is None:
raise ConversionError('TextDocument conversion error. '
More information about the Erp5-report
mailing list