renmu123 / obsidian-image-auto-upload-plugin

auto upload image with picgo
MIT License
350 stars 38 forks source link

MacOS 版本(从Excel,Word)粘贴非图片格式时,也会自动上传 #49

Closed snail123815 closed 2 years ago

snail123815 commented 2 years ago

插件更新到2.6.2之后,在MacOS系统下#19没有解决。

插件设置:Auto pasted upload选项开启,Default uploader设置为PicGo-Core,fixPath开启。 系统设置见文末。 截图粘贴上传正常,拖拽图片文件上传正常。

从Excel复制粘贴一段表格,会同时上传并显示表格截图: image

从Word粘贴一段文字过来,文字内容会被插件拦截并试图上传,并报错:

Failed request:  "Please check PicGo-Core config"
[PicGo ERROR]: Error: image not found in clipboard
    at dt.upload (/usr/local/lib/node_modules/picgo/dist/index.cjs.js:1:44992)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /usr/local/lib/node_modules/picgo/dist/index.cjs.js:1:3206

imageAutoUploadPlugin.handleFailedUpload @ plugin:obsidian-image-auto-upload-plugin:3655

同时文字内容无法正确粘贴,会显示上传失败。

系统信息:

SYSTEM INFO:
    Obsidian version: v0.15.9
    Installer version: v0.15.9
    Operating system: Darwin Kernel Version 21.6.0: Mon Aug 22 20:17:10 PDT 2022; root:xnu-8020.140.49~2/RELEASE_X86_64 21.6.0
    Login status: not logged in
    Insider build toggle: off
    Live preview: on
    Legacy editor: off
    Base theme: dark
    Community theme: none
    Snippets enabled: 0
    Restricted mode: off
    Plugins installed: 8
    Plugins enabled: 8
        1: Vimrc Support v0.7.3
        2: Image auto upload Plugin v2.6.2
        3: Advanced Tables v0.17.3
        4: Excel to Markdown Table v0.4.0
        5: Obsidian Enhancing Export v1.1.5
        6: Various Complements v7.1.1
        7: Custom Attachment Location v0.0.9
        8: Shell commands v0.16.0
renmu123 commented 2 years ago

加了一个配置项来控处理这种行为