🐛 Bug fixes

This commit is contained in:
2024-08-04 21:12:35 +08:00
parent d8e79fb4f9
commit 4f6c5aa053
6 changed files with 40 additions and 25 deletions

View File

@ -138,8 +138,9 @@ class AttachmentUploaderController extends GetxController {
queueOfUpload[idx].isCompleted = true;
}
queueOfUpload.value =
queueOfUpload.where((x) => x.error == null).toList(growable: true);
queueOfUpload.value = queueOfUpload
.where((x) => x.error == null && x.isCompleted)
.toList(growable: true);
_stopProgressSyncTimer();
_syncProgress();

View File

@ -89,6 +89,8 @@ class AttachmentProvider extends GetConnect {
final AuthProvider auth = Get.find();
if (auth.isAuthorized.isFalse) throw Exception('unauthorized');
await auth.ensureCredentials();
final filePayload =
dio.MultipartFile.fromBytes(data, filename: basename(path));
final fileAlt = basename(path).contains('.')