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

oss20190517 upload part api set header 'Content-Type' invalid #2

Open
nadirvishun opened this issue Jun 10, 2022 · 2 comments
Open

Comments

@nadirvishun
Copy link

the upload part api can't identify the file mime ,so need set the Content-Type in the api InitiateMultipartUpload,there are not ContentType method, so I used headerParam,but after uploaded ,the Content-Type not change, what the right way to change the Content-Type?

 InitiateMultipartUploadRequest initiateMultipartUploadRequest = InitiateMultipartUploadRequest.builder()
                    .bucket(bucket)
                    .key(ossKey)
                    .headerParam("Content-Type", FileTypeUtils.getContentType(file))//here
                    .build();
@yndu13
Copy link
Collaborator

yndu13 commented Aug 3, 2022

您好,可以根据您的需求来选择使用的SDK,OSS原生支持的com.aliyun.oss:aliyun-sdk-oss和升级版非异步的com.aliyun:oss-20190517都是不支持异步调用的,升级版非异步SDK对新手较友好,尤其是其他语言转过来的开发者,较容易上手。而升级版异步库,也就是本库,面向对象是高级开发者,是阿里云官方SDK团队和对象存储团队合作的库,虽然目前还有未完善的地方,但是会持续更新,后续会逐步完善。

@yndu13
Copy link
Collaborator

yndu13 commented Aug 3, 2022

收到反馈,我们这边排查下

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

2 participants