Commit 99ca37fd authored by Romain Courteaud's avatar Romain Courteaud

As the filename is not used as document ID, there is no reason to call checkId.

It prevents losing filename information (in case of non ASCII character) and
allow extracting metadata from it.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26292 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2d00ec8b
...@@ -224,17 +224,6 @@ class ContributionTool(BaseTool): ...@@ -224,17 +224,6 @@ class ContributionTool(BaseTool):
document.edit(file=kw['file']) document.edit(file=kw['file'])
return document return document
#
# Strong possibility of a new file.
#
try:
self._checkId(file_name)
except BadRequest:
extension = ''
if '.' in file_name:
extension = '.%s' % file_name.split('.')[-1]
file_name = '%s%s' % (self.generateNewId(), extension)
# Then put the file inside ourselves for a short while # Then put the file inside ourselves for a short while
if container_path is not None: if container_path is not None:
container = self.getPortalObject().restrictedTraverse(container_path) container = self.getPortalObject().restrictedTraverse(container_path)
......
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