-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
feat: API to save external links as attachments #6364
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6364 +/- ##
============================================
+ Coverage 58.18% 58.26% +0.08%
- Complexity 3774 3786 +12
============================================
Files 651 651
Lines 22125 22221 +96
Branches 1538 1544 +6
============================================
+ Hits 12873 12947 +74
- Misses 8641 8663 +22
Partials 611 611 ☔ View full report in Codecov by Sentry. |
5b4f691
to
d2dcd86
Compare
...cation/src/main/java/run/halo/app/core/extension/attachment/endpoint/AttachmentEndpoint.java
Outdated
Show resolved
Hide resolved
...cation/src/main/java/run/halo/app/core/extension/attachment/endpoint/AttachmentEndpoint.java
Outdated
Show resolved
Hide resolved
...cation/src/main/java/run/halo/app/core/extension/attachment/endpoint/AttachmentEndpoint.java
Outdated
Show resolved
Hide resolved
...cation/src/main/java/run/halo/app/core/extension/attachment/endpoint/AttachmentEndpoint.java
Outdated
Show resolved
Hide resolved
...ication/src/main/java/run/halo/app/core/extension/service/impl/DefaultAttachmentService.java
Show resolved
Hide resolved
...ication/src/main/java/run/halo/app/core/extension/service/impl/DefaultAttachmentService.java
Outdated
Show resolved
Hide resolved
...ication/src/main/java/run/halo/app/core/extension/service/impl/DefaultAttachmentService.java
Show resolved
Hide resolved
...ication/src/main/java/run/halo/app/core/extension/service/impl/DefaultAttachmentService.java
Show resolved
Hide resolved
application/src/main/java/run/halo/app/infra/ReactiveUrlDataBufferFetcher.java
Outdated
Show resolved
Hide resolved
了解了,等此 PR 合并之后我会重新生成一次 OpenAPI。 |
d2dcd86
to
a1eecd0
Compare
/hold 目前接口还需要有很多需要考虑设计的地方,比如
因此暂时先停止合并,等待其配套工作完成之后再做此功能。 |
Hi @LIlGG ,请先解决一下代码格式问题。 |
/unhold 对于文件安全性和大小的限制,在 PR #6390 中已经实现。 |
...ication/src/main/java/run/halo/app/core/extension/service/impl/DefaultAttachmentService.java
Outdated
Show resolved
Hide resolved
application/src/main/resources/extensions/role-template-attachment.yaml
Outdated
Show resolved
Hide resolved
...ication/src/main/java/run/halo/app/core/extension/service/impl/DefaultAttachmentService.java
Outdated
Show resolved
Hide resolved
d9886c5
to
eddbf10
Compare
测试失败了需要修复一下 |
Quality Gate passedIssues Measures |
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.
/ping @halo-dev/sig-halo
/approve
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: guqing, JohnNiang, ruibaby The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind api-change
/kind feature
/area core
What this PR does / why we need it:
see #2335
增加将第三方资源转存为附件资源的接口。
/apis/api.console.halo.run/v1alpha1/attachments/-/upload-from-url
UC:
/apis/uc.api.content.halo.run/v1alpha1/attachments/-/upload-from-url
其中参数为
How to test it?
测试能否将第三方接口的资源保存至附件中。
测试各类附件,例如图片、视频、文本等。
Does this PR introduce a user-facing change?