halo-dev / halo

强大易用的开源建站工具。
https://www.halo.run
GNU General Public License v3.0
33.93k stars 9.68k forks source link

Request to build attachments' link with unified format #6961

Open JohnNiang opened 4 days ago

JohnNiang commented 4 days ago

Your current Halo version

2.20.7

Describe this feature

Currently, if we upload a file into S3 bucket with private read permission, the object cannot be accessed directly. We have to build a presigned URL to share the object, but the URL has expiration. So we cannot put the presigned URL into attachment permalink.

If we set the attachment permalink like <http://localhost:8090/attachments/{attachment.metadata.name}/{attachment.spec.displayName} and redirect to presigned URL when accessing the permalink, the problem will be resolved.

References

Additional information

/kind feature /area core

guqing commented 3 days ago

目前上传完附件之后总是需要轮训等待链接才行包括 vscode halo 插件这些实现,但是这样例如 PicGo 这些工具上传之后将无法显示图片,如果实现了此功能是否就可以不需要轮训等待 permalink 了