trganda / obsidian-attachment-management

Attachment Management of Obsidian
MIT License
143 stars 8 forks source link

Not sure what to call this, probably not a bug, related to multiple formats on pasteboard #64

Closed luckman212 closed 9 months ago

luckman212 commented 9 months ago

Hi @trganda

I updated my Attachment Management to 0.8.3 and faced a surprising problem.

I use CleanShot X to edit images/screenshots before pasting into Obsidian. I noticed that the images I edited/copied from CleanShot were no longer being handled.

I found https://github.com/trganda/obsidian-attachment-management/issues/63 issue and when I added the .* override, it started working again.

image

Is this the recommended solution? Just wanted to know if this was correct. Thank you!

Here is the difference, fyi, for these objects in the pasteboard, I used Pasteboard Viewer to display it.

original png image, copied and pasted (works fine). types are only public.png

screen 0

edit this image in CleanShot, add a line for example, and copy it

screen 1

after copying from CleanShot, this is the object, types are types are public.png and public.file-url

screen 2

pasting into Obsidian, it is no longer handled by the plugin

screen 4
trganda commented 9 months ago

Hi @luckman212 , sorry for that. It's a bug exactly.

In default, this plugin should be only working on images extension, with pattern expression (jpe?g|png|gif|svg|bmp|eps|webp). And I have fixed it in 0.8.4.

The soluation in https://github.com/trganda/obsidian-attachment-management/issues/63 was for handle all extension file, and it happens to solve this bug.

trganda commented 9 months ago

So, If you if you don't need to handle all extension, delete the extension override you already added with pattern .*.

luckman212 commented 9 months ago

Thanks @trganda I will re-try it!

Working fine again, without the override (as before) — thank you so much!