def _multipart_upload(self, local_file, bucket, s3_file): transfer_config = TransferConfig(multipart_threshold=1024 * 25, multipart_chunksize=1024 * 25, use_threads=False) self.s3_resource.Object(bucket, s3_file).upload_file(local_file, Config=transfer_config, Callback=ProgressPercentage(local_file))