From 4c365f31336181375737b6d8df5c864ec029a551 Mon Sep 17 00:00:00 2001 From: tanlongsheng <252620078@qq.com> Date: Wed, 9 Jul 2025 12:17:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=8A=E4=BC=A0=E9=9F=B3?= =?UTF-8?q?=E9=A2=91=E8=BF=9B=E5=BA=A6=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/core/utils/upload_oss.dart | 1 + lib/data/services/meeting/meeting_upload_service.dart | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/core/utils/upload_oss.dart b/lib/core/utils/upload_oss.dart index 1adeefe8e..a2fb54bbf 100644 --- a/lib/core/utils/upload_oss.dart +++ b/lib/core/utils/upload_oss.dart @@ -51,6 +51,7 @@ class UploadOss { bucket, pathName, filePath: filepath, + progressCallBack: onSendProgress, resultListener: ResultListener( (Map? header, CosXmlResult? result) { final url = result?.accessUrl ?? diff --git a/lib/data/services/meeting/meeting_upload_service.dart b/lib/data/services/meeting/meeting_upload_service.dart index 78cd097eb..294a13bd4 100644 --- a/lib/data/services/meeting/meeting_upload_service.dart +++ b/lib/data/services/meeting/meeting_upload_service.dart @@ -6,7 +6,7 @@ import '../db/sqflite_api.dart'; class MeetingUploadService extends GetxService { RxInt meetingId = 0.obs; - RxDouble uploadProgress = 0.6.obs; + RxDouble uploadProgress = 0.0.obs; RxList uploadList = [].obs; bool _isUpload = false; @@ -39,6 +39,9 @@ class MeetingUploadService extends GetxService { final audiourl = await UploadOss.upload( filepath: element['filepath'], rootDir: element['rootdir'], + onSendProgress: (int count, int total) { + uploadProgress.value = count / total; + }, ); await SqfliteApi.editMeetingTitle( element['id'],