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

Download images alongside markdown files save images to same name #45

Closed
franklin373 opened this issue Jan 22, 2021 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@franklin373
Copy link

franklin373 commented Jan 22, 2021

Download URL: https://mp.weixin.qq.com/s/q_a0_qXpui-SkIdQv-E49A

if not enable option "Download images alongside markdown files", download markdown file's images would be something in markdown file like:
![Image](https://mmbiz.qpic.cn/mmbiz_gif/0UdhCqGulicdW4XSJpnW7ZAoZGPRNe4icfibylabw3GfUTtKRHo3v2TwxBCcrSnwzV4wN8LiaQ5oib4hJKa3sMeYnXA/640?wx_fmt=gif&tp=webp&wxfrom=5&wx_lazy=1)
![Image](https://mmbiz.qpic.cn/mmbiz_jpg/0UdhCqGulicdW4XSJpnW7ZAoZGPRNe4icf9FscoN4ueNV9ApDbV2pmKGPSTB59R9LWtTliblfQoGlcpgRAO9VXmSA/640?wx_fmt=jpeg&tp=webp&wxfrom=5&wx_lazy=1&wx_co=1)

if enable option "Download images alongside markdown files", then those images would point to same name:
![Image](_resources/%E5%B9%BC%E5%84%BF%E5%9B%AD%E8%BF%91%E8%A7%86%E9%98%B2%E6%8E%A7%E6%89%8B%E5%86%8C/640)
![Image](_resources/%E5%B9%BC%E5%84%BF%E5%9B%AD%E8%BF%91%E8%A7%86%E9%98%B2%E6%8E%A7%E6%89%8B%E5%86%8C/640)

Hope it could be solved as bug or new feature, Thank you.
@deathau deathau added the bug Something isn't working label Jan 24, 2021
@deathau
Copy link
Owner

deathau commented Jan 24, 2021

Ah, I see what's happening here. Both images do, in fact, have the same name. If you look at the URLs, the file name for both is "640". So I'll need to append a number to make the filename unique. In this situation, you'd likely end up with 640 and 640(1) (or maybe 640.1).

🤔 I might also want to see if the file is missing the extension, and if it is like these are, try and ascertain the correct extension and append that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants