I create a html in plotly and want to upload it to azure blob storage.
fig.write_html("C:/test.html")
How to write it in memory, so that I can upload it?
When using
html_file = io.StringIO()
fig.write_html(html_file)
I get the error on upload, that is not bytes.
When normally uploading html strings I use
blob_client.upload_blob(html.encode('utf-8') ,blob_type="BlockBlob", overwrite=True, content_settings=ContentSettings(content_type='text/html'))
Any suggestions how to do this?
EDIT:
I need to write it into memory, since I am using it in an azure function.