#NEWLINE# def _save( self , name , content ) : #NEWLINE# #INDENT# if hasattr ( content . file , 'content_type' ) : #NEWLINE# #INDENT# content_type = content . file . content_type #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# content_type = mimetypes . guess_type ( name ) [ 0 ] #NEWLINE# #UNINDENT# if hasattr ( content , 'chunks' ) : #NEWLINE# #INDENT# content_data = b'' . join ( ( chunk for chunk in content . chunks ( ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# content_data = content . read ( ) #NEWLINE# #UNINDENT# self . connection . put_blob ( self . azure_container , content , content_data , 'BlockBlob' , x_ms_blob_content_type = content_type ) #NEWLINE# return name