Skip to content

Commit

Permalink
Fix issue with collective.upload not setting filename on uploaded ima…
Browse files Browse the repository at this point in the history
…ges (Archetypes) Fixes #20
  • Loading branch information
ericof committed Jul 23, 2013
1 parent 423521b commit 3e80eae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/collective/upload/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,12 @@ def upload(self, files, title='', description=''):
# Set data
if portal_type == 'File':
if IATFile.providedBy(newfile):
newfile.setFile(data)
newfile.setFile(data, filename=filename)
else:
newfile.file = wrapped_data
elif portal_type == 'Image':
if IATImage.providedBy(newfile):
newfile.setImage(data)
newfile.setImage(data, filename=filename)
else:
newfile.image = wrapped_data
# Finalize content creation, reindex it
Expand Down

0 comments on commit 3e80eae

Please sign in to comment.