-
Notifications
You must be signed in to change notification settings - Fork 668
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
put object body type #2038
Comments
I've hit this issue as well @fengjiansunren , see #1108. For now I'm working around it by disabling retrying (returning the original error): noRetry := func(options *s3.Options) {
options.RetryMaxAttempts = 1
}
output, err := w.client.PutObject(ctx, input, noRetry) |
Hi @fengjiansunren , Is your body an io.ReadSeeker? The SDK needs to seek through it to calculate the The solution provided on #1108 is correct. You can also look at #1938 to see if the solution there is applicable. Let us know if you have any other questions. |
@Thomasdezeeuw
|
@RanVaknin |
|
Hi @RanVaknin, just wanted to mention that we're seeing a similar issue (as of v1.31.0 of the S3 SDK) where a retry fails due to not being able to rewind the stream. My assumption is that (as mentioned above), when it comes to retry handling the SDK actually requires an io.ReadSeeker in order to be able to rewind the input stream. Whilst that's fine, the question would be whether this should be reflected in the PutObjectInput declaration, which still just requires a plain io.Reader? (ref) Is this an inconsistency in the SDK, or is there some other reason it's been done this way? Thanks! |
The issue still persists for Minio and newer SDK: github.com/aws/aws-sdk-go-v2 v1.21.0
github.com/aws/aws-sdk-go-v2/config v1.18.42
github.com/aws/aws-sdk-go-v2/service/s3 v1.39.0 Resolved with a workaround from @fengjiansunren |
您好!已收到!
|
Describe the bug
c.Request.Body is received from http request, then sdk-v2 client use this body
Expected Behavior
no error
Current Behavior
err message
Reproduction Steps
sdk-v2 client putobject use body from http request
Possible Solution
No response
Additional Information/Context
No response
AWS Go SDK V2 Module Versions Used
Compiler and Version used
1.19.2
Operating System and version
centos 7.6
The text was updated successfully, but these errors were encountered: