Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resource with image as externalLink generates invalid markdown #57

Closed
jeffutter opened this issue Mar 28, 2024 · 2 comments
Closed

resource with image as externalLink generates invalid markdown #57

jeffutter opened this issue Mar 28, 2024 · 2 comments

Comments

@jeffutter
Copy link

I have a memo setup that hosts files (including images) in S3 compatible storage.

The resource returned from the memo API has a direct link to the image under externalLink.

Given that, this code here: https://github.com/quanru/obsidian-periodic-para/blob/22046390e73b9e6a517a43eff15fa5847c513192/src/util.ts#L122-L129 generates invalid markdown.

It generates ![[http://mydomain.com/files/path/to/file.png]].

That syntax is expecting a local file. Ideally, this plugin would download the linked file and store it in my vault. However, second to that generating a valid markdown image embed like ![file.png](http://mydomain.com/files/path/to/file.png) would also be OK.

The resource payload includes type: "image/png" so we could hopefully use that to detect images that should generate different markdown.

@quanru
Copy link
Owner

quanru commented Mar 30, 2024

  1. external link can't be download due to cors problem
  2. how to deal with external link which is not image?

@quanru
Copy link
Owner

quanru commented Mar 30, 2024

close by version 1.12.3

@quanru quanru closed this as completed Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants