Alternative for TransferManager in AWS sdk Java 2.x

北城以北 提交于 2021-01-28 10:58:25

问题


TransferManager class has been removed from AWS sdk Java 2.x. What is the alternative for TransferManager and how it can be used


回答1:


TransferManager wasn't removed, it was just not implemented in Java 2.X yet. You can see the project to implement TransferManager on their github. It is currently in development and there does not appear to be a timeline of when this will be completed.

You can use the S3Client.putObject method to transfer an object over to your S3 bucket, or if you really must use TransferManager you can include the AWS S3 SDK version 1.X and use TransferManager along with AWS S3 SDK 2.X.

Example:

S3Client s3 = S3Client.builder ().credentialsProvider (/*Your credentials*/).build ();
s3.putObject (/*param1*/, /*param2*/)


来源:https://stackoverflow.com/questions/59577177/alternative-for-transfermanager-in-aws-sdk-java-2-x

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!