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

Request to build attachments' link with unified format #6961

Open
JohnNiang opened this issue Oct 28, 2024 · 2 comments
Open

Request to build attachments' link with unified format #6961

JohnNiang opened this issue Oct 28, 2024 · 2 comments
Labels
area/core Issues or PRs related to the Halo Core kind/feature Categorizes issue or PR as related to a new feature.

Comments

@JohnNiang
Copy link
Member

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

@f2c-ci-robot f2c-ci-robot bot added kind/feature Categorizes issue or PR as related to a new feature. area/core Issues or PRs related to the Halo Core labels Oct 28, 2024
@guqing
Copy link
Member

guqing commented Oct 30, 2024

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

@JohnNiang
Copy link
Member Author

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

Halo Core 可以先提供这个能力,最终是否使用这种链接,完全取决于插件。例如 S3 插件就可以在 AttachmentHandler#getPermalink 方法中返回这样的附件链接形式。但是,permalink 仍然是异步设置的,可能还是无法解决轮训等待 permalink 的问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core Issues or PRs related to the Halo Core kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants