mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-22 05:51:53 +00:00
parent
7c17c50245
commit
064d2d1544
3 changed files with 4 additions and 0 deletions
|
|
@ -150,6 +150,7 @@ def chooser_upload(request):
|
|||
# Set image file hash
|
||||
image.file.seek(0)
|
||||
image._set_file_hash(image.file.read())
|
||||
image.file.seek(0)
|
||||
|
||||
form.save()
|
||||
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@ def edit(request, image_id):
|
|||
# Set new image file hash
|
||||
image.file.seek(0)
|
||||
image._set_file_hash(image.file.read())
|
||||
image.file.seek(0)
|
||||
|
||||
form.save()
|
||||
|
||||
|
|
@ -260,6 +261,7 @@ def add(request):
|
|||
# Set image file hash
|
||||
image.file.seek(0)
|
||||
image._set_file_hash(image.file.read())
|
||||
image.file.seek(0)
|
||||
|
||||
form.save()
|
||||
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ def add(request):
|
|||
image.file_size = image.file.size
|
||||
image.file.seek(0)
|
||||
image._set_file_hash(image.file.read())
|
||||
image.file.seek(0)
|
||||
image.save()
|
||||
|
||||
# Success! Send back an edit form for this image to the user
|
||||
|
|
|
|||
Loading…
Reference in a new issue