halo-dev / halo

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

1.6.0在附件中上传的文件也会被打上图片处理 #2594

Closed 52lemon6 closed 10 months ago

52lemon6 commented 2 years ago

是什么版本出现了此问题?

1.6.0

使用的什么数据库?

H2

使用的哪种方式部署?

Docker

在线站点地址

No response

发生了什么?

1.6.0在附件中上传的文件也会被打上图片处理 ↓图片处理策略 image ↓上传的文件信息 image

相关日志输出

No response

附加信息

No response

ruibaby commented 2 years ago

/kind improvement /good-first-issue

f2c-ci-robot[bot] commented 2 years ago

@ruibaby: This request has been marked as suitable for new contributors.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed by commenting with the /remove-good-first-issue command.

In response to [this](https://github.com/halo-dev/halo/issues/2594): >/kind improvement >/good-first-issue Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
Own-lin commented 2 years ago

“关于上传附件到COS的问题”

看到之前有类似的issue以及QA: https://github.com/halo-dev/halo/issues/1102 https://bbs.halo.run/d/1854/2

在看解决方案前请先检查以下几点:

  1. 请先保证Bucket的读策略为 公读私写
  2. 请保证图片处理策略是正确的(不正确的策略会直接进行append到原URL尾部,并且不会进行CI处理)
    (请对照文档https://cloud.tencent.com/document/product/460/46823#.E6.A0.B7.E5.BC.8F.E7.AE.A1.E7.90.86)

我的解决方案

需要注意的是:

image image

对应的接口为:api/admin/attachments/upload 对应的核心方法为: run.halo.app.handler.file. TencentCosFileHandler#upload

JohnNiang commented 10 months ago

1.x 已经停止维护,请参考 https://www.halo.run/archives/halo-1.x-eol。我们将关闭当前 Issue。

/traige unresolved /close

f2c-ci-robot[bot] commented 10 months ago

@JohnNiang: Closing this issue.

In response to [this](https://github.com/halo-dev/halo/issues/2594#issuecomment-1894893962): >1.x 已经停止维护,请参考 。我们将关闭当前 Issue。 > >/traige unresolved >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.