Skip to content

Commit 10ea5d0

Browse files
committed
avoid converting SVG
1 parent de76f55 commit 10ea5d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

browser/main/lib/dataApi/attachmentManagement.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ function handleAttachmentDrop (codeEditor, storageKey, noteKey, dropEvent) {
279279
if (dropEvent.dataTransfer.files.length > 0) {
280280
promise = Promise.all(Array.from(dropEvent.dataTransfer.files).map(file => {
281281
if (file.type.startsWith('image')) {
282-
if (file.type.endsWith('gif')) {
282+
if (file.type === 'image/gif' || file.type === 'image/svg+xml') {
283283
return copyAttachment(file.path, storageKey, noteKey).then(fileName => ({
284284
fileName,
285285
title: path.basename(file.path),

0 commit comments

Comments
 (0)