Azure blob UnicodeDecodeError while reading jpg using python

Try with code like this:

from azure.storage.blob import BlobClient
import base64

blob = BlobClient.from_connection_string(conn_str="your-connect-string", container_name="container_name", blob_name="blob_name")
stream = blob.download_blob()
data = stream.readall()

encoded = base64.b64encode(data).decode()

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top