question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't download files with presigned URL

See original GitHub issue

After upgrading to 8.3.4 version, any attempt to download a file with presigned URLs fails with error:

<Error>
<Code>AccessDenied</Code>
<Message>There were headers present in the request which were not signed</Message>
<Key>6142949676471660040_121.jpg</Key>
<BucketName>testing-incoming</BucketName>
<Resource>/6142949676471660040_121.jpg</Resource>
<RequestId>16BCEA5AC683F9AE</RequestId>
<HostId>bf97ca14-e8b3-414f-9dea-de47d980c1c8</HostId>
</Error>

Same java library is used to generate the URL and then download.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
harshavardhanacommented, Dec 3, 2021

See the example here

// Get presigned URL string to download 'my-objectname' in 'my-bucketname' 
// with response-content-type as application/json and life time as one day.
Map<String, String> reqParams = new HashMap<String, String>();
reqParams.put("response-content-type", "application/json");

String url =
    minioClient.getPresignedObjectUrl(
        GetPresignedObjectUrlArgs.builder()
            .method(Method.GET)
            .bucket("my-bucketname")
            .object("my-objectname")
            .expiry(1, TimeUnit.DAYS)
            .extraQueryParams(reqParams)
            .build());
System.out.println(url);
0reactions
innovationhub-asiacommented, Dec 3, 2021

Thanks, will follow this guidance.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot download file with presigned url to remote server ...
Since I am using a presigned url it already has the required authorization & signature headers to download the file.
Read more >
Resolve Files Not Downloading In Amazon (AWS)
Steps To Follow If Files Are Not Downloading & Displaying Access Denied Message ... Generate a pre-signed URL for the Amazon S3 object....
Read more >
Sharing objects using presigned URLs - AWS Documentation
Describes how to set up your objects so that you can share them with others by creating a presigned URL to download the...
Read more >
bug: Cannot donwload S3 files uploaded with a pre-signed ...
I am uploading files to S3 using pre-signed URLs. ... Second surprising behaviour: I cannot download a file from my localstack S3 bucket ......
Read more >
Download file using pre-signed URL - Amazon API Gateway p11
In this tutorial, I have demonstrated how to download a file from the S3 bucket using a pre-signed URL via API Gateway.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found