Commit da04d2f4 authored by Nicolas Delaby's avatar Nicolas Delaby

If no content_type was not reading from file, guess it from filename value.

It will help portal_contribution_registry to provide better results


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41125 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 17a3edbb
......@@ -182,6 +182,11 @@ class ContributionTool(BaseTool):
kw['content_type'] = content_type
kw['file'] = file_object
if not content_type:
# fallback to a default content_type according provided
# filename
content_type = self.guessMimeTypeFromFilename(filename)
# If the portal_type was provided, we can go faster
if portal_type and container is None:
# We know the portal_type, let us find the default module
......
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