BaiduPanUploadManager class
处理上传文件
具体的上传能力和限制请参考 官网
总体步骤是:
- 预上传
- 分片上传
- 合并分片
切片规则
普通用户单个分片大小固定为4MB(文件大小如果小于4MB,无需切片,直接上传即可),单文件总大小上限为4G。 普通会员用户单个分片大小上限为16MB,单文件总大小上限为10G。 超级会员用户单个分片大小上限为32MB,单文件总大小上限为20G。
- Mixed in types
Constructors
- BaiduPanUploadManager({required String accessToken, bool showLog = false, bool secretAccessToken = false})
-
官方关于上传文件夹限制的说明
每个第三方在网盘只能拥有一个文件夹用于存储上传文件,该文件夹必须位于/apps目录下, apps下的文件夹名称为申请接入填写的申请接入的产品名称,假如你申请接入的产品名称为”云存储“, 那么该文件夹为/apps/云存储,用户看到的文件夹为/我的应用数据/云存储。
const
Properties
- accessToken → String
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- secretAccessToken → bool
-
final
- showLog → bool
-
final
Methods
-
merge(
{required String remotePath, required String localPath, required String uploadid, required List< String> blockMd5List, UploadRenameRtype rtype = UploadRenameRtype.alwaysRename}) → Future<UploadSuccess> - 合并分片文件,并创建远端文件
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
preCreate(
{required String remotePath, required String localPath, UploadRenameRtype rtype = UploadRenameRtype.none, required int memberLevel, String? uploadid, BaiduMd5? md5, Md5Calculated? onMd5Calculated}) → Future< PreCreate> - 预上传,其实就是在远端创建文件或文件夹
-
toString(
) → String -
A string representation of this object.
inherited
-
uploadSinglePart(
{required String remotePath, required String localPath, required int memberLevel, required String uploadid, required int partseq}) → Future< UploadPart>
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited