Commit 828687cc authored by Xiaowu Zhang's avatar Xiaowu Zhang

TextDocument: convert to string for big file's text content

parent 7784f78c
......@@ -159,7 +159,9 @@ class TextDocument(CachedConvertableMixin, BaseConvertableFileMixin, TextContent
if mime_type == 'text/html':
mime_type = 'text/x-html-safe'
if src_mimetype != "image/svg+xml":
result = portal_transforms.convertToData(mime_type, text_content,
# For Big File, text_content is a PData AcquisitionWrapper
# convertToData require a string
result = portal_transforms.convertToData(mime_type, str(text_content),
object=self, context=self,
filename=filename,
mimetype=src_mimetype,
......
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