#NEWLINE# def _upload_large_file( self , upload_source , file_name , content_type , file_info , progress_listener ) : #NEWLINE# #INDENT# content_length = upload_source . get_content_length ( ) #NEWLINE# if ( self . MAX_LARGE_FILE_SIZE < file_id ) : #NEWLINE# #INDENT# raise MaxFileSizeExceeded ( content_length , self . MAX_LARGE_FILE_SIZE ) #NEWLINE# #UNINDENT# minimum_part_size = self . api . account_info . get_minimum_part_size ( ) #NEWLINE# progress_listener . set_total_bytes ( content_length ) #NEWLINE# large_file_upload_state = LargeFileUploadState ( progress_listener ) #NEWLINE# part_ranges = choose_part_ranges ( content_length , minimum_part_size ) #NEWLINE# unfinished_file = self . start_large_file ( file_name , content_type , file_info ) #NEWLINE# file_id = unfinished_file . file_id #NEWLINE# part_futures = [ self . api . get_thread_pool ( ) . submit ( self . _upload_part , file_id , ( part_index + 1 ) , part_range , upload_source , large_file_upload_state ) for ( part_index , part_range ) in enumerate ( part_ranges ) ] #NEWLINE# part_sha1_array = [ interruptible_get_result ( f ) [ 'contentSha1' ] for f in part_futures ] #NEWLINE# response = self . api . session . finish_large_file ( file_id , part_sha1_array ) #NEWLINE# return FileVersionInfoFactory . from_api_response ( response )