mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
feat: parallel upload & download image (#556)
* feat: parallel upload file * feat: parallel download file
This commit is contained in:
committed by
GitHub
parent
25995b0ed6
commit
76d031e8d1
@@ -1,5 +1,4 @@
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
import 'package:PiliPlus/common/widgets/refresh_indicator.dart';
|
||||
import 'package:PiliPlus/http/msg.dart';
|
||||
import 'package:PiliPlus/models/msg/session.dart';
|
||||
@@ -273,7 +272,6 @@ class _WhisperDetailPageState
|
||||
biz: 'im',
|
||||
);
|
||||
if (result['status']) {
|
||||
int imageSize = await File(pickedFile.path).length();
|
||||
String mimeType = lookupMimeType(pickedFile.path)
|
||||
?.split('/')
|
||||
.getOrNull(1) ??
|
||||
@@ -284,7 +282,7 @@ class _WhisperDetailPageState
|
||||
'width': result['data']['image_width'],
|
||||
'imageType': mimeType,
|
||||
'original': 1,
|
||||
'size': imageSize / 1024,
|
||||
'size': result['data']['img_size'] / 1024,
|
||||
};
|
||||
SmartDialog.showLoading(msg: '正在发送');
|
||||
await _whisperDetailController.sendMsg(
|
||||
|
||||
Reference in New Issue
Block a user