1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +00:00

fix: GIFs don't animate

This commit is contained in:
Aaron-Bird
2019-01-31 01:08:07 +08:00
parent 6960c8b2d6
commit 806139091c

View File

@@ -258,8 +258,9 @@ function handleAttachmentDrop (codeEditor, storageKey, noteKey, dropEvent) {
const originalFileName = path.basename(filePath) const originalFileName = path.basename(filePath)
const fileType = file['type'] const fileType = file['type']
const isImage = fileType.startsWith('image') const isImage = fileType.startsWith('image')
const isGif = fileType.endsWith('gif')
let promise let promise
if (isImage) { if (isImage && !isGif) {
promise = fixRotate(file).then(base64data => { promise = fixRotate(file).then(base64data => {
return copyAttachment({type: 'base64', data: base64data, sourceFilePath: filePath}, storageKey, noteKey) return copyAttachment({type: 'base64', data: base64data, sourceFilePath: filePath}, storageKey, noteKey)
}) })