Commit f408e855 authored by Bartek Górny's avatar Bartek Górny

set source_reference automatically upon upload

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12197 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d31e55a3
......@@ -116,6 +116,12 @@ class File(Document, CMFFile, ConversionCacheMixin):
security.declareProtected( Permissions.ModifyPortalContent, 'edit' )
edit = WorkflowMethod( _edit )
security.declareProtected(Permissions.ModifyPortalContent, 'manage_upload')
def manage_upload(self, file='', REQUEST=''):
res = CMFFile.manage_upload(self, file, REQUEST)
self.setSourceReference(file.filename)
return res
# Copy support needs to be implemented by ExtFile
################################
# Special management methods #
......
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