How can I get the upload progress when uploading to Google Drive with driveApi.files.create

Viewed 177

How can I get the upload progress?

var driveApi = ga.DriveApi(client);
var fileToUpload = File(sfilePath + sfileName + '.jpg');
var response = await driveApi.files.create(ga.File()..name = 'my_file.jpg',
     uploadMedia: ga.Media(fileToUpload.openRead(), fileToUpload.lengthSync()));
print(response.toJson());  

Even on stackoverflows existing questions there is only this example but never with the progress for uploading. Have anybody an idea, please?

0 Answers
Related