Skip to content

BaseBlobService.get_blob_to_stream returns unusable Blob.content #538

Description

Which service(blob, file, queue) does this issue concern?

Blob

Which version of the SDK was used? Please provide the output of pip freeze.

azure-storage-blob==1.4.0
azure-storage-common==1.4.0
azure-storage-file==1.4.0
azure-storage-nspkg==3.0.0
azure-storage-queue==1.4.0

What problem was encountered?

import io
from azure.storage.blob.baseblobservice import BaseBlobService

blob_service = BaseBlobService(connection_string="...")
stream = io.BytesIO()
blob_file = blob_service.get_blob_to_stream("...", "...", stream=stream)

type(blob_file.content)

prints NoneType

What is the rationale for returning an empty Blob.content in this case? I should be able to use Blob.content, instead I'm required to pass a stream object and use that one, which appears inconsistent with the rest of the get_blob_* methods based on Blob.content (e.g. get_blob_to_text, get_blob_to_bytes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions