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
UploadStreamToBlockBlob: file doesn't appear in Azure Storage #17131
Comments
Hi @ItalyPaleAle, thanks for reaching out! Receiving a successful HTTP status indicates that the blob was most likely created successfully. How are you checking the existence of the blob btw? If it's with the portal or Azure Storage Explorer, could you please refresh just to double check? Please let us know and we'll open an investigation accordingly upon your confirmation. Thanks. |
@zezha-msft I'm looking at the Azure Portal and the blob doesn't appear in the container. I have tried refreshing the page. |
I've been trying to repro this outside of my own code's test environment but I can't repro it correctly yet. I'm going to close this for now assuming that's a bug in my code. Will reopen if I can create a reliable repro environment :) |
@zezha-msft I figured out what the issue is. There is a bug in the SDK that I can now repro, although it's different that I originally thought. The file is created, but my tests were then deleting it because of a bug somewhere else. In essence, when using |
Thanks @ItalyPaleAle for the confirmation, much appreciated. |
Hey @ItalyPaleAle , azblob v0.4.0 is now publically available. I have fixed the issue here and here. Please reach out if it still persists. Thanks a lot for your feedbacks! |
Bug Report
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0
go version
: go version go1.17.5 linux/arm64Using UploadStreamToBlockBlob to upload a block blob from a stream doesn't seem to work. The method returns no error, but the file doesn't appear in Azure Storage.
This is an extract of the code that I'm using, and I'm connected to an Azure Storage account running on Azure (no emulator). The connection is successful, as I'm able to, for example, create containers.
Note that
in
is aio.Reader
readable stream, andmetadata
is amap[string]string
.Running the code above, I don't get any error (
err
is nil), and res shows a 201 response. It also contains a valid ETag. But nothing is created in the Storage Account.PS: I have to use
UploadStreamToBlockBlob
rather thanUpload
because the stream doesn't implement a seeker (would be great if that wasn't a requirement in the first place, as that API seems more "complete").The text was updated successfully, but these errors were encountered: