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

avoid converting SVG

This commit is contained in:
Baptiste Augrain
2019-02-04 14:09:11 +01:00
parent de76f55fe2
commit 10ea5d00eb

View File

@@ -279,7 +279,7 @@ function handleAttachmentDrop (codeEditor, storageKey, noteKey, dropEvent) {
if (dropEvent.dataTransfer.files.length > 0) {
promise = Promise.all(Array.from(dropEvent.dataTransfer.files).map(file => {
if (file.type.startsWith('image')) {
if (file.type.endsWith('gif')) {
if (file.type === 'image/gif' || file.type === 'image/svg+xml') {
return copyAttachment(file.path, storageKey, noteKey).then(fileName => ({
fileName,
title: path.basename(file.path),