thielepaul / photoprism-mobile

Flutter App for PhotoPrism
GNU General Public License v3.0
895 stars 67 forks source link

[FEATURE REQUEST] Add a progress bar for uploads #126

Open gomme600 opened 3 years ago

gomme600 commented 3 years ago

Hi again,

I think that it would be a good idea to have some sort of progress bar for uploads. When uploading large videos the auto uploader appears to be stuck but in reality it is just taking a long time to upload.

A progress bar (or progress circle like in google photos) would help with this.

Thanks

xarantolus commented 2 years ago

Hi, I'm currently looking into this issue. One problem I faced is that the progress listener function seems to not be called by the flutter_uploader package, at least on Android 11. I changed to code to the following, but still there's no output from any of the functions:

uploader.progress.listen(
  (UploadTaskProgress progress) {
    photoprismModel.addLogEntry(
        'AutoUploaderProgress', progress.progress.toString());
  },
  onError: (Object ex, StackTrace stacktrace) {
    photoprismModel.addLogEntry('AutoUploaderProgressError', ex.toString());
  },
  onDone: () {
    photoprismModel.addLogEntry('AutoUploaderProgressDone', 'done');
  },
  cancelOnError: false,
);

Does anyone have an idea what the root cause could be? I already tried setting the flutter_uploader version to 1.2.1 to see if the problem also happens on a non-beta version, but that version is quite old and doesn't seem to support newer flutter versions.