-
Notifications
You must be signed in to change notification settings - Fork 850
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
azblob.Client.UploadStream allows incomplete uploads #21837
Comments
Hi @sam701. Thanks for reaching out. |
For your use case where you are using |
@souravgupta-msft thanks for the heads up.
This is a good example. According to the
It is not always an option. Consider large uploads where the entire file being uploaded does not fit into the available memory. |
Even if io.Reader.Read is used here, we will get |
What exactly implementation do you mean? |
My current fix is to wrap the |
One issue I see using
|
It is an absolutely fair point that you want to fill the buffer as much as possible. Maybe you can implement your own |
This is a good point. Let me discuss this with my team as well. |
The fix has been merged and will be part of the next release. |
@souravgupta-msft Thank you for implementing! |
Bug Report
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob
1.2.0
go version
:go version go1.21.1 darwin/arm64
What happened?
Call
returns
err == nil
whentheReader.Read(..)
returns0, io.ErrUnexpectedEOF
What did you expect or want to happen?
The
err == io.ErrUnexpectedEOF
How can we reproduce it?
This line in azblob treats
io.ErrUnexpectedEOF
as an expected error.As an example
http.Request.Body
returnsio.ErrUnexpectedEOF
on connection lost. When I callthe returned
err
isnil
and the container contains a partially uploaded file.The text was updated successfully, but these errors were encountered: