This repository was archived by the owner on Nov 10, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
src/main/java/org/springframework/integration/aws/outbound Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright 2016-2023 the original author or authors.
2+ * Copyright 2016-2024 the original author or authors.
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
2222import java .util .concurrent .CompletionException ;
2323import java .util .function .BiConsumer ;
2424
25- import org .apache .commons .io .FileUtils ;
2625import software .amazon .awssdk .core .async .AsyncRequestBody ;
2726import software .amazon .awssdk .core .internal .util .Mimetype ;
2827import software .amazon .awssdk .services .s3 .S3AsyncClient ;
@@ -311,8 +310,7 @@ else if (payload instanceof File fileToUpload) {
311310 if (putObjectRequest .contentType () == null ) {
312311 putObjectRequestBuilder .contentType (Mimetype .getInstance ().getMimetype (fileToUpload ));
313312 }
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 );
316314 }
317315 else if (payload instanceof byte [] payloadBytes ) {
318316 if (putObjectRequest .contentMD5 () == null ) {
You can’t perform that action at this time.
0 commit comments