-
Notifications
You must be signed in to change notification settings - Fork 6
Wiki:Confluence HTML 图片 #13
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
Comments
初步方案:前端上传图片到 CODING,替换 HTML 中图片链接。 调研发现:CODING 没有上传图片的接口,而提供了 上传 zip 的接口: https://help.coding.net/openapi#9c802a105eb5c9b336871209f6feedf0 而 zip 是什么格式呢?文档没说明。 在网页后台找到了:
看来这样更方便,文章里的多张图一次全部上传。 |
CODING 接口使用 文件名 作为文章标题,而 Confluence 文件名为英文或数字,没法用。参考 #11 (comment) 所以,需要先创建 wiki,后修改名字。 那么最好是:一次上传一篇,改名字。那需要解析 markdown,获取图片,把一个 md 和几张图片压成 zip,上传。这个解析是必须的,因为还有附件需要处理。 如果一次上传所有,再改名字,行不行?其实也行。 |
发现一个坑:overtrue/laravel-filesystem-cos 临时上传密钥 无法使用 laravel storage 上传。 经排查,overtrue 不是基于腾讯官方 SDK,而腾讯官方已支持 https://cloud.tencent.com/document/product/436/14048 |
为了解决上面的问题,fork 了两个包,升级了依赖: 安装成功。运行报错:
搜索发现,可能是:缺少临时 token https://cloud.tencent.com/developer/ask/203132 检查代码发现,cos 官方 sdk 没问题 https://github.com/sinkcup/cos-php-sdk-v5/blob/b8174cb10c535b596cf1c5b58301d2317b81132a/src/Qcloud/Cos/Client.php#L113 而 laravel-filesystem-cos 没有传递进去,修改配置增加 token,成功:
|
wiki 不支持 svg,暂不处理,或者和附件一起处理。 |
HTML 中带了 图片,需要上传贴图
The text was updated successfully, but these errors were encountered: