-
Notifications
You must be signed in to change notification settings - Fork 680
s3.PutObject silently fails when key starts with a slash #1701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hey @leonid-shevtsov I am not able to reproduce this behavior you have described. Can you please enable request and response logging for requests following the Logging developer guide? As show in my testing I was able to put this key in the bucket, and that key was visible within the aws console. In this example I used the key PutObject
GetObject
Console View |
Thanks! After inspecting responses - and the bucket - I found the files. So, the change from API v1 is that the leading slash is not trimmed from the key. And then in the quasi-nesting S3 filesystem, it appears in a nameless "folder", and not in the root. This seems logical (setting the difference with v1 aside). It's also consistent with the ruby sdk (that we use to read the files - turns out, we even had to the leading slash manually). So, now I see nothing wrong with the handling of keys. |
|
Describe the bug
An
s3.PutObject
will return no error - and a seemingly validPutObjectOutput
- when thePutObjectInput.Key
contains a leading slash. No object appears in the bucket.The same input in aws-sdk-go v1 worked fine.
Expected Behavior
Either the operation succeeding, or failing with an error, either way is fine by me.
Current Behavior
Error is nil. PutObjectOutput is valid and indistinguishable from a successful upload.
Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
AWS Go SDK V2 Module Versions Used
Compiler and Version used
go version go1.18.1 darwin/arm64
Operating System and version
macOS 12.3.1
The text was updated successfully, but these errors were encountered: