Commit 2f5eb725 authored by Romain Courteaud's avatar Romain Courteaud

Try to guess the portal if it is not passed as parameter


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24351 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9eb6ed53
...@@ -243,6 +243,8 @@ class ContributionTool(BaseTool): ...@@ -243,6 +243,8 @@ class ContributionTool(BaseTool):
extension = '.%s' % file_name.split('.')[-1] extension = '.%s' % file_name.split('.')[-1]
file_name = '%s%s' % (self.generateNewId(), extension) file_name = '%s%s' % (self.generateNewId(), extension)
# Try to guess the portal if it is not passed as parameter
if portal_type is None:
portal_type = self._guessPortalType(file_name, mime_type, data) portal_type = self._guessPortalType(file_name, mime_type, data)
# Then put the file inside ourselves for a short while # Then put the file inside ourselves for a short while
......
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