Open vl-dev opened 4 years ago
Declaring var b []byte
as var b []byte = make([]byte, sizeoffile)
fixes the issue. I find it odd this buffer function doesn't take a byteBuffer which could grow to fit the blob
Note the output has changed to returning an error about "out of range" since io.WriterAt change
If you change the buffer length to be larger than 0 but smaller than file, you'll get "Not enough space for all bytes"
Which version of the SDK was used?
0.10.0
Which platform are you using? (ex: Windows, Linux, Debian)
centos-release-7-8.2003.0.el7.centos.x86_64
What problem was encountered?
We have blobs with the
ContentEncoding = gzip
stored in the Azure Blob storage container. When we tried to use the functionDownloadBlobToBuffer
we got the following panic:How can we reproduce the problem in the simplest way?
ContentEncoding
set togzip
(or change the encoding directly in the portal)import ( "context" "fmt" "log" "net/url"
)
func main() { containerName := ""
accountKey := ""
accountName := ""
blobName := ""
}