Replies: 2 comments
-
Likely Check if there is a way to do that, or see domain section here on how to configure virtual-host-style requests. |
Beta Was this translation helpful? Give feedback.
-
@klauspost you are correct. The config is quite clunky, it's now set up like this:
Fixing that, I get the output as expected:
Full code for reference:
This could form a basis for a documentation update as I expect more and more people will start using the new SDK and guidance online is quite sparse. For the time being, I guess people can at least find this issue and the resolution here. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Expected Behavior
I wanted to try the new SDK that went GA quite recently. I wanted to list and get objects in my Minio server.
(As a side note - it might be handy to include the v2 SDK example code in minio's docs.)
Current Behavior
All I got was
api error NoSuchBucket: The specified bucket does not exist
. I would understand an issue with auth or anything else, but here the SDK is telling me the bucket doesn't exist, even if I plug in the bucket name fromListBuckets
(the only method I found to work so far).Possible Solution
Downgrading to AWS SDK v1 or Minio's client library works. Not really a solution.
Looking at the trace, it seems like MinIO is looking for a bucket named like the object. You can see the in the XML at the very end of the trace that it didn't find bucket
data.txt
. That is something to go on.Steps to Reproduce (for bugs)
1. Installed the following
2. Set up the server and uploaded data
3. Try to retrieve that data with MinIO's Go library
(Code largely taken from minio docs)
4. Try to retrieve that data with AWS SDK for Go v1
(Code largely taken from minio docs)
trace
5. Try to download the data using AWS SDK for Go v2
trace
Context
I wanted to integrate MinIO for local integration tests to mock my S3 buckets - I used to grab the v1 SDK to do this, but went with v2 this time around and hit this issue.
Regression
Not having worked with MinIO for long, I can't tell at this point.
Your Environment
Beta Was this translation helpful? Give feedback.
All reactions