Skip to content

Commit

Permalink
🔊 Log new filename for debugging purposes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jannes Höke committed Dec 17, 2019
1 parent cd0887a commit 22fd269
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/cms/models/attachment.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ def update_attachment(self):
bio.seek(0)

new_filename = default_storage.generate_filename(filename)
print('New filename:', new_filename)
path = default_storage.save(new_filename, ContentFile(bio.read(), name=new_filename))
self.media = path

0 comments on commit 22fd269

Please sign in to comment.