mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-14 02:06:29 +00:00
avoid converting SVG
This commit is contained in:
@@ -279,7 +279,7 @@ function handleAttachmentDrop (codeEditor, storageKey, noteKey, dropEvent) {
|
|||||||
if (dropEvent.dataTransfer.files.length > 0) {
|
if (dropEvent.dataTransfer.files.length > 0) {
|
||||||
promise = Promise.all(Array.from(dropEvent.dataTransfer.files).map(file => {
|
promise = Promise.all(Array.from(dropEvent.dataTransfer.files).map(file => {
|
||||||
if (file.type.startsWith('image')) {
|
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 => ({
|
return copyAttachment(file.path, storageKey, noteKey).then(fileName => ({
|
||||||
fileName,
|
fileName,
|
||||||
title: path.basename(file.path),
|
title: path.basename(file.path),
|
||||||
|
|||||||
Reference in New Issue
Block a user