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

生成签名URL然后通过签名URL上传文件,Content-Type 不应该参与Signature 校验 #391

Open
tys2019 opened this issue Jul 7, 2023 · 3 comments

Comments

@tys2019
Copy link

tys2019 commented Jul 7, 2023

参照官方提供的案例:https://help.aliyun.com/document_detail/59670.htm?spm=a2c4g.11186623.0.0.482924cbR6N1lg#concept-59670-zh
image
img_v2_17a7470a-50a9-495b-9bb4-282b0674d5eg

生成签名链接前, 指定了Content-Type, 提供给第三方使用的签名上传URL 必须使用 构造签名上传链接的相同 Content-Type。 否则会出现SignatureDoesNotMatch 错误码403.

若生成签名链接前, 忽略Content-Type,提供给第三方使用的签名上传URL 必须也忽略 Content-Type, 否则会出现SignatureDoesNotMatch 错误码403.

现使用第二种方式,导致第三方上传文件的时候,获取到对应的下载链接不能浏览器预览 例如html 格式,上传经常自动携带Content-Type 导致服务报错。种种不方便。使用极为不方便。

参考aws 的S3 , oracle 的oci 都没这个限制,希望解除这个限制

@welllog
Copy link

welllog commented Aug 16, 2023

非常赞同,很多场景不需要知道上传文件的Content-Type,现在则必须指定固定的Content-Type。腾讯也没有这个限制

@Keeyuu
Copy link

Keeyuu commented Oct 26, 2023

这个设定太蠢了

@nasa1024
Copy link

没人解决吗?

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

No branches or pull requests

4 participants