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

Refactor AList attachment handler and AList verification #19

Merged
merged 2 commits into from
Sep 12, 2024

Conversation

JohnNiang
Copy link
Contributor

@JohnNiang JohnNiang commented Sep 10, 2024

This PR wholly refactors AList attachment handler and AList verification.

After uploading an attachment, we will put the annotation alist.storage.halo.run/file-path into attachment annotations. Then we can use it while getting permalink and deleting it instead of use spec.displayName.

BYW, the caches of tokens and WebClients are removed because I think they are unnecessary in this situation and they may cause some problems unexpected. If we encountered the performance issue in the future, the feature would be considered again.

Meanwhile, uploading file will be renamed automatically if it's name already exists.

/kind improvement

Fixes #13
Fixes #16

解决上传成功后无法立即访问附件的问题

@f2c-ci-robot f2c-ci-robot bot added kind/improvement Categorizes issue or PR as related to a improvement. release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Sep 10, 2024
@f2c-ci-robot f2c-ci-robot bot requested review from guqing and ruibaby September 10, 2024 09:43
Copy link

f2c-ci-robot bot commented Sep 10, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from johnniang. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Signed-off-by: JohnNiang <[email protected]>
@JohnNiang JohnNiang changed the title WIP: Refactor attachment handler Refactor AList attachment handler and AList verification Sep 10, 2024
@f2c-ci-robot f2c-ci-robot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 10, 2024
@JohnNiang
Copy link
Contributor Author

I'm going to merge this PR manually if no further feedback.

@JohnNiang
Copy link
Contributor Author

/ping @halo-sigs/halo
/ping @Roozenlz

@JohnNiang JohnNiang merged commit 3d787dc into halo-sigs:main Sep 12, 2024
1 of 2 checks passed
@JohnNiang JohnNiang deleted the refactor/attachment-handler branch September 12, 2024 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/improvement Categorizes issue or PR as related to a improvement. release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

显示完成上传,但实际未成功 上传的文件不能马上使用
1 participant