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

催更一下上传图片的功能 #19

Open
xiarunjie opened this issue Oct 8, 2024 · 3 comments
Open

催更一下上传图片的功能 #19

xiarunjie opened this issue Oct 8, 2024 · 3 comments
Assignees

Comments

@xiarunjie
Copy link

亲爱的作者您好!
催更一下您这个插件关于上传包含图片的功能。。。
目前其他方面的功能都够用了。
唯一的缺憾就是不能上传图片。
等你。

@ruibaby
Copy link
Member

ruibaby commented Oct 8, 2024

感谢反馈,之前实现的时候遇到一些问题:

  1. 如果使用客户端上传的方式,会存在跨域问题。
  2. 如果使用 Obsidian 提供的 request API 上传,会导致图片无法访问,尚不清楚原因。

等 Halo 2.20 LTS 发布之后,我会再抽时间维护一下这个仓库。

@ruibaby ruibaby self-assigned this Oct 10, 2024
@Appleec
Copy link

Appleec commented Oct 14, 2024

尝试按照 obsidian-wordpress 插件上传文件思路好像成功了。

请求API: https://xxxx.com/apis/api.console.halo.run/v1alpha1/attachments/upload
请求头: {"Authorization": "Bearer [token]},
请求体:{"file":"$FILE","policyName":"attachment-policy-gUpSV","groupName":"attachment-group-JWlvm"}

代码逻辑参考:

可进行测试,希望对你有帮助 @ruibaby

@noame19
Copy link

noame19 commented Nov 1, 2024

目前有曲线救国的方式,直接使用image auto upload plugin 插件,同时电脑端安装picgo server,然后直接调用图床一键替换图片链接,再上传halo就好了。

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