Commit 0fdc7b5f authored by Nicolas Delaby's avatar Nicolas Delaby

* Try to provide original file_name for ingested documents, it can help portal_transforms

to guess original mime_type.
reviewed by romain


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31690 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent dff78d5d
......@@ -215,9 +215,10 @@ class TextDocument(Document, TextContent):
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. '
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment