Merge pull request #1935 from Human-Connection/1932-use-filename-for-cropped-images

Maintain filename for cropped images
This commit is contained in:
Alexander Friedland 2019-10-17 09:40:03 +02:00 committed by GitHub
commit 8fd1bb28ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -100,8 +100,9 @@ export default {
thumbnailElement.appendChild(image)
// Remove the editor from view
editor.parentNode.removeChild(editor)
this.$emit('addTeaserImage', blob)
})
const croppedImageFile = new File([blob], file.name, { type: 'image/jpeg' })
this.$emit('addTeaserImage', croppedImageFile)
}, 'image/jpeg')
})
editor.appendChild(confirm)