You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/06/06 07:50:50 UTC
[GitHub] [camel] zhfeng commented on a diff in pull request #7727: CAMEL-18167: camel-aws2-s3 - Show a message when download link url is…
zhfeng commented on code in PR #7727:
URL: https://github.com/apache/camel/pull/7727#discussion_r889906479
##########
components/camel-aws/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Producer.java:
##########
@@ -579,6 +579,10 @@ private void createDownloadLink(Exchange exchange) {
.build();
PresignedGetObjectRequest presignedGetObjectRequest = presigner.presignGetObject(getObjectPresignRequest);
+ if (!presignedGetObjectRequest.isBrowserExecutable()) {
Review Comment:
good point - `DEBUG` level makes sense and if `checksum` validation enabled, users have to send a signedPayload. such codes refers to https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/s3/presigner/S3Presigner.html
```
// Send any request payload that is needed by the service (not needed when isBrowserExecutable is true)
if (presignedRequest.signedPayload().isPresent()) {
connection.setDoOutput(true);
try (InputStream signedPayload = presignedRequest.signedPayload().get().asInputStream();
OutputStream httpOutputStream = connection.getOutputStream()) {
IoUtils.copy(signedPayload, httpOutputStream);
}
}
```
Is it possible to use a header to hold a `InputStream` value?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org