Commit a2c5fde1 authored by Fabien Morin's avatar Fabien Morin

don't try to guess content_type if it's already setup


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35631 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b8295f98
......@@ -246,7 +246,7 @@ class ContributionTool(BaseTool):
# Then edit the document contents (so that upload can happen)
document._edit(**kw)
if getattr(document, 'guessMimeType', None) is not None:
if not document.hasContentType() and getattr(document, 'guessMimeType', None) is not None:
# For File force to setup the mime_type
document.guessMimeType(fname=file_name)
if url:
......
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