uploadGroupSharedFile method
~english Uploads the shared file to the group.
When a shared file is uploaded, the upload progress callback will be triggered.
Param groupId
The group ID.
Param filePath
The local path of the shared file.
Throws A description of the exception. See ChatError. ~end
~chinese 上传共享文件至群组。
Param groupId
群组 ID。
Param filePath
共享文件的本地路径。
Throws 如果有异常会在此抛出,包括错误码和错误信息,详见 ChatError。 ~end
Implementation
Future<void> uploadGroupSharedFile(
String groupId,
String filePath,
) async {
Map req = {'groupId': groupId, 'filePath': filePath};
Map result =
await _channel.invokeMethod(ChatMethodKeys.uploadGroupSharedFile, req);
try {
ChatError.hasErrorFromResult(result);
} on ChatError catch (e) {
throw e;
}
}