File tree 1 file changed +2
-4
lines changed
src/main/java/org/springframework/integration/aws/outbound
1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2016-2023 the original author or authors.
2
+ * Copyright 2016-2024 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
22
22
import java .util .concurrent .CompletionException ;
23
23
import java .util .function .BiConsumer ;
24
24
25
- import org .apache .commons .io .FileUtils ;
26
25
import software .amazon .awssdk .core .async .AsyncRequestBody ;
27
26
import software .amazon .awssdk .core .internal .util .Mimetype ;
28
27
import software .amazon .awssdk .services .s3 .S3AsyncClient ;
@@ -311,8 +310,7 @@ else if (payload instanceof File fileToUpload) {
311
310
if (putObjectRequest .contentType () == null ) {
312
311
putObjectRequestBuilder .contentType (Mimetype .getInstance ().getMimetype (fileToUpload ));
313
312
}
314
- // TODO until https://github.com/aws/aws-sdk-java-v2/issues/3839
315
- requestBody = AsyncRequestBody .fromBytes (FileUtils .readFileToByteArray (fileToUpload ));
313
+ requestBody = AsyncRequestBody .fromFile (fileToUpload );
316
314
}
317
315
else if (payload instanceof byte [] payloadBytes ) {
318
316
if (putObjectRequest .contentMD5 () == null ) {
You can’t perform that action at this time.
0 commit comments