Can't perform PutObject operation #738
Labels
No Label
AdminAPI
Bug
Check AWS
CI
Correctness
Critical
Documentation
Ideas
Improvement
Low priority
Newcomer
Performance
S3 Compatibility
Testing
Usability
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Deuxfleurs/garage#738
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Thank you very much for garage! Previously, I was using minio with
aws-sdk-s3
in Rust. Now, I am attempting to transition to garage, but my previous code that was working no longer functions correctly. In this code snippet, I am trying to upload a file to an S3 bucket namedmustore-data
with the keyreceived/user1:886773de-cc58-4d2b-81bb-b4db05349817:avatar.png
:However, the output I received indicates an error:
The issue is that
received/
is being interpreted as a bucket name instead of a virtual directory as intended.Also, if I use ':' instead of '/', with key 'received:user1:524bb5c8-c585-4123-b36a-1257d826325b:avatar.png', I got:
Please, how would I fix that?
There are two style of URLs in AWS S3: path-style and dns-style. Here, Garage is expecting a path-style URL, where the fist component is the name of the bucket, but your client is sending a dns-style request, where the bucket name is supposed to be part of the host name. Configure your client to use path style (the option is variously called use_path_style or force_path_style) and it should work.
@lx, That works, thanks you very much!