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

可以加入将图片下载到本地的功能吗 #18

Open
Rrubidium opened this issue Aug 19, 2023 · 4 comments
Open

可以加入将图片下载到本地的功能吗 #18

Rrubidium opened this issue Aug 19, 2023 · 4 comments

Comments

@Rrubidium
Copy link

可以加入将图片下载到本地的功能吗,类似https://github.com/gxr404/yuque-dl项目

@vannvan
Copy link
Owner

vannvan commented Aug 19, 2023

可以加入将图片下载到本地的功能吗,类似https://github.com/gxr404/yuque-dl项目

语雀的图片防盗链对于本地IDE是没有影响的,除了我了解到idea支持的不是很好之外。而对于线上的话可以在自己的站点可以通过以下方式避免防盗链

<meta name="referrer" content="no-referrer" />

如果是需要将文档存放在其它第三方平台(github目前加载是不会被防盗链的),而不具备自己加no-referrer的条件的话,那就算将图片下载到本地也会存在再重新“上传”的过程,所以一开始我考虑的是将图片下载到本地是一个“伪需求”,因此就没有做。

如果确有此需求的话目前可以考虑了解一下elog 的CLI

感谢支持!

@Rrubidium
Copy link
Author

谢谢大佬

@vannvan vannvan mentioned this issue Aug 19, 2023
@shepherdwind
Copy link

https://gist.github.com/shepherdwind/f23d46046e18c16192d16a6769113d5c

我从 https://github.com/atian25/yuque-exporter/blob/master/src/lib/doc.ts 把代码抠出来了,需要的可以试试。

@lusq010
Copy link

lusq010 commented Jun 17, 2024

可以对通过语雀api获取的md内容中的图片链接转一把base64再导入其他平台

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

4 participants