Commit 6246d723 authored by Ivan Tyagov's avatar Ivan Tyagov

Do process and convert uploaded file only if conversion is actually possible.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29779 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6cb586d1
...@@ -88,6 +88,7 @@ merged_content = None\n ...@@ -88,6 +88,7 @@ merged_content = None\n
\n \n
try:\n try:\n
new_content = context.portal_contributions.newContent(**kw)\n new_content = context.portal_contributions.newContent(**kw)\n
if new_content.isSupportBaseDataConversion():\n
new_content.processFile()\n new_content.processFile()\n
merged_content = new_content.Document_convertToBaseFormatAndDiscoverMetadata(file_name=file_name)\n merged_content = new_content.Document_convertToBaseFormatAndDiscoverMetadata(file_name=file_name)\n
except ConversionError, Fault:\n except ConversionError, Fault:\n
......
842 843
\ No newline at end of file \ No newline at end of file
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