Skip to content

fix(storage): disable chunked encoding for Aliyun OSS compatibility#376

Merged
dongmucat merged 2 commits intomainfrom
fix/oss-chunked-encoding
May 8, 2026
Merged

fix(storage): disable chunked encoding for Aliyun OSS compatibility#376
dongmucat merged 2 commits intomainfrom
fix/oss-chunked-encoding

Conversation

@dongmucat
Copy link
Copy Markdown
Collaborator

@dongmucat dongmucat commented May 6, 2026

问题

当 S3 存储 provider 指向阿里云 OSS 时,上传 skill.md 失败:

InvalidArgument: aws-chunked encoding is not supported

阿里云 OSS 对 AWS SDK 的 兼容说明 中要求禁用 chunked encoding。

改动

新增配置项 skillhub.storage.s3.disable-chunked-encoding(环境变量 SKILLHUB_STORAGE_S3_DISABLE_CHUNKED_ENCODING,默认 false),通过 S3Configuration.chunkedEncodingEnabled 透传到 AWS SDK v2。

  • 代码默认值 false,保持标准 AWS S3 / MinIO 行为不变
  • .env.release.example 里默认 true(该 example 本身面向阿里云 OSS 场景)

使用

接入阿里云 OSS 时加一行环境变量:

SKILLHUB_STORAGE_S3_DISABLE_CHUNKED_ENCODING=true

Closes #365

Adds skillhub.storage.s3.disable-chunked-encoding (env:
SKILLHUB_STORAGE_S3_DISABLE_CHUNKED_ENCODING, default false) so
operators can turn off aws-chunked encoding when the S3 backend is
Aliyun OSS, which rejects it with 'InvalidArgument: aws-chunked
encoding is not supported'.

Closes #365
@dongmucat dongmucat force-pushed the fix/oss-chunked-encoding branch from 805387d to e3a0dcb Compare May 6, 2026 05:57
@dongmucat dongmucat merged commit aecdecc into main May 8, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] OSS存储兼容性

1 participant