#NEWLINE# def upload( self , destination_path , blob = None , local_path = None , no_cache = None , content_type = None ) : #NEWLINE# #INDENT# extra_args = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# if no_cache : #NEWLINE# #INDENT# extra_args [ 'CacheControl' ] = 'no-cache' #NEWLINE# #UNINDENT# if content_type : #NEWLINE# #INDENT# extra_args [ 'ContentType' ] = content_type #NEWLINE# #UNINDENT# s3_object = self . get_object ( destination_path ) #NEWLINE# assert ( ( local_path is None ) or ( blob is None ) ) #NEWLINE# if local_path : #NEWLINE# #INDENT# with open ( local_path , 'rb' ) as data : #NEWLINE# #INDENT# s3_object . put ( Body = data , ** extra_args ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# assert isinstance ( blob , bytes ) #NEWLINE# s3_object . put ( Body = blob , ** data )