admin管理员组文章数量:1399986
In the AWS SDK v1, it was possible to add a ProgressListener directly to a MultipleFileUpload object and set up logging in the progressedChanged method so that the progress of a directory upload could be logged periodically as it was running. I am looking for an equivalent to this behavior in v2.
I see that there are TransferListeners in v2 which are associated with single file uploads and downloads. These can be set up for an UploadDirectoryRequest by doing something like the following:
UploadDirectoryRequest.builder()
.uploadFileRequestTransformer((request) -> {
request.addTransferListener(LoggingTransferListener.create());
})
.build();
But this would make a listener per file upload request and in order to log out the progress of a directory upload, it would be necessary to keep track of all of the listeners created for each file and sum the bytes transferred in each. It seems like there should be a way to do this more simply that I have not figured out. Is there a more efficient way?
本文标签:
版权声明:本文标题:aws sdk java 2.0 - Is there a simple way to get the progress of an uploadDirectory request to S3TransferManager? - Stack Overflo 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744218841a2595766.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论