flutter_qiniu

Last updated:

0 purchases

flutter_qiniu Image
flutter_qiniu Images
Add to Cart

Description:

flutter qiniu

flutter_qiniu #
A new flutter plugin project for Qiniu.
Getting Started #
/// 单个文件上传
///
/// [file] 文件
/// [key] 保存在服务器上的资源唯一标识
/// [token] 服务器分配的 token
Future<String> _onUpload(File file, String key, String token) async {

final qiniu = FlutterQiniu(zone: QNFixedZone.zone2);

qiniu.onProgressChanged().listen((dynamic percent) {
// 上传进度
double p = percent;
});

String resultKey = await qiniu.upload(file.path, key, token);

return resultKey;
}

/// 多个文件上传
Future<List<String>> _onUploadFiles(List<FilePathEntity> entities) async {
final qiniu = FlutterQiniu(zone: QNFixedZone.zone1);
List<String> resultKeys = await qiniu.uploadFiles(entities);

return resultKeys;
}
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.