uploadH5File method
Upload custom H5 courseware to the ZegoDocs service.
Supported version: 2.0.0 and above
Description: During file upload, the SDK converts the file format based on the introduced config
. After format conversion, the width, height, page number, and thumbnail display mode are determined by the introduced config
. You can obtain the upload progress in the result callback.
Business scenario: Upload custom H5 courseware to the ZegoDocs service.
Calling time: Call this API after the SDK is initialized.
@param filePath Local path of the custom courseware @param config Related configuration information of the custom H5 courseware @param completionBlock Result callback
@return Map of the file upload API.
Implementation
Future<Map?> uploadH5File({
required String filePath,
required ZegoUploadCustomH5Config? config,
}) async {
var map = await _channel.invokeMethod('uploadH5File', {
'filePath': filePath,
'config': config?.toMap() ?? {},
}) ??
{};
return map;
}