UploadManager class
文件 / 媒体上传,对齐 LumenIM apis/customize.ts + store/modules/uploads.ts。
- FormData 接口明文上传(跳过 AES)
- initMultipart 为 JSON + AES
- 大文件分片:服务端
shard_size默认 5MB,串行上传,索引 1-based
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
initMultipart(
{required String fileName, required int fileSize, CancelToken? cancelToken}) → Future< UploadInitMultipartResult> - 初始化大文件分片上传(JSON + AES)
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
uploadArticleAnnex(
{required int articleId, required Uint8List bytes, required String filename, CancelToken? cancelToken, void onSendProgress(int sent, int total)?}) → Future< ArticleAnnexUploadResult> - 上传笔记文章附件
-
uploadEmoticonCustomize(
{required Uint8List bytes, required String filename, CancelToken? cancelToken, void onSendProgress(int sent, int total)?}) → Future< EmoticonUploadResult> - 上传自定义表情
-
uploadFileInShards(
{required Uint8List bytes, required String fileName, bool enforceChatFileLimit = true, CancelToken? cancelToken, void onProgress(double progress)?}) → Future< String> -
完整大文件分片上传(对齐 Web
uploadsStore.initUploadFile+ 串行triggerUpload)。 -
uploadMediaFile(
{required Uint8List bytes, required String filename, int? width, int? height, CancelToken? cancelToken, void onSendProgress(int sent, int total)?}) → Future< UploadMediaFileResult> - 上传媒体(头像裁剪、聊天图片/视频封面等)
-
uploadMultipartShard(
{required String uploadId, required int splitIndex, required int splitNum, required Uint8List bytes, String filename = 'blob', CancelToken? cancelToken, void onSendProgress(int sent, int total)?}) → Future< UploadMultipartResult> - 上传单个分片
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- defaultShardSize → const int
- maxArticleAnnexBytes → const int
- maxChatFileBytes → const int
- maxEmoticonBytes → const int