-
Notifications
You must be signed in to change notification settings - Fork 12
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
支持飞书传图GitHub #231
支持飞书传图GitHub #231
Conversation
freeziyou
commented
Feb 22, 2024
•
edited
Loading
edited
- img_key转换成url,通过url直接调用飞书下载图片
- 权限控制(公私仓库)
else str(task.result), | ||
"result": ( | ||
task.result if isinstance(task.result, list) else str(task.result) | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里改了结构,需要和前端沟通好,免得前端调用接口的时候报错
私有仓库 传图那个有解吗?能否先牺牲一点安全性,先考虑基本可用(比如直接把GitHub那边的图片链接发送到飞书这边来) |
在GitHub上放图片时,会由Github未开放的api上传到服务器(https://github.com/upload/policies/assets),最后返回一个需要用户token验证的图片链接,正是因为Github做了安全性导致无法可用 |
从飞书传图到GitHub公私仓库都没问题,主要是Github私有仓库传图到飞书有问题 |
授权之后的GitMaya机器人也无法访问GitHub私有仓库的图片对吧? |
没法访问,和林哥探索的唯一方式是拿GitHub personal user token可以访问,但这个只能由用户自己在Github手动创建token,并且权限过大,仅为看图不合理…而且测试其他包括oauth token installation token都没用 |
这个图片的链接可以拿到吧,直接回传到飞书呗 |
不上传飞书图床,直接显示原始链接url ,可行吗? @freeziyou |
可以做,但这样的话,相当于飞书这边只显示图片链接没显示图片 |