Client class

Constructors

Client()
factory

Properties

auth Auth?
getter/setter pairinherited
authGetter FutureOr<Auth> Function()
latefinalinherited
bucketName String
final
endpoint String
final
hashCode int
The hash code for this object.
no setterinherited
isUnAuthenticated bool
whether auth is valid or not
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

appendObject(List<int> fileData, String fileKey, {CancelToken? cancelToken, PutRequestOption? option, int? position}) Future<Response>
upload object(file) to oss server fileData is the binary data that will send to oss server position next position that append to, default value is 0.
contentType(String filename) String
inherited
copyObject(CopyRequestOption option, {CancelToken? cancelToken}) Future<Response>
copy object
deleteBucketPolicy({String? bucketName, CancelToken? cancelToken}) Future<Response>
delete bucket policy
deleteObject(String fileKey, {String? bucketName, CancelToken? cancelToken}) Future<Response>
delete object from oss
deleteObjects(List<String> keys, {String? bucketName, CancelToken? cancelToken}) Future<List<Response>>
delete objects from oss
doesObjectExist(String fileKey, {String? bucketName, CancelToken? cancelToken, Options? options}) Future<bool>
get object(file) from oss server fileKey is the object name from oss bucketName is optional, we use the default bucketName as we defined in Client
downloadObject(String fileKey, String savePath, {String? bucketName, CancelToken? cancelToken, ProgressCallback? onReceiveProgress}) Future<Response>
download object(file) from oss server fileKey is the object name from oss savePath is where we save the object(file) that download from oss server bucketName is optional, we use the default bucketName as we defined in Client
getAllRegions({CancelToken? cancelToken}) Future<Response>
get all supported regions
getAuth() Future<Auth>
get auth information from sts server
inherited
getBucketAcl({String? bucketName, CancelToken? cancelToken}) Future<Response>
get bucket acl
getBucketInfo({String? bucketName, CancelToken? cancelToken, ProgressCallback? onReceiveProgress}) Future<Response>
get bucket info bucketName is optional, we use the default bucketName as we defined in Client
getBucketPolicy({String? bucketName, CancelToken? cancelToken}) Future<Response>
get bucket policy
getBucketStat({String? bucketName, CancelToken? cancelToken, ProgressCallback? onReceiveProgress}) Future<Response>
get bucket stat bucketName is optional, we use the default bucketName as we defined in Client
getObject(String fileKey, {String? bucketName, CancelToken? cancelToken, Options? options, ProgressCallback? onReceiveProgress}) Future<Response>
get object(file) from oss server fileKey is the object name from oss bucketName is optional, we use the default bucketName as we defined in Client
getObjectMeta(String fileKey, {CancelToken? cancelToken, String? bucketName}) Future<Response>
get object metadata
getRegion(String region, {CancelToken? cancelToken}) Future<Response>
get all supported regions
getSignedUrl(String fileKey, {String? bucketName, int expireSeconds = 60, Map<String, dynamic>? params}) Future<String>
get signed url from oss server fileKey is the object name from oss bucketName is optional, we use the default bucketName as we defined in Client expireSeconds is optional, default expired time are 60 seconds
getSignedUrls(List<String> fileKeys, {String? bucketName, int expireSeconds = 60}) Future<Map<String, String>>
get signed url from oss server fileKeys list of object name from oss bucketName is optional, we use the default bucketName as we defined in Client expireSeconds is optional, default expired time are 60 seconds
listBuckets(Map<String, dynamic> parameters, {CancelToken? cancelToken, ProgressCallback? onReceiveProgress}) Future<Response>
list objects from oss server parameters parameters for filter, refer to: https://help.aliyun.com/document_detail/31957.html
listObjects(Map<String, dynamic> parameters, {String? bucketName, CancelToken? cancelToken, ProgressCallback? onReceiveProgress}) Future<Response>
list objects from oss server parameters parameters for filter, refer to: https://help.aliyun.com/document_detail/187544.html bucketName is optional, we use the default bucketName as we defined in Client
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
putBucketAcl(AclMode aciMode, {CancelToken? cancelToken, String? bucketName}) Future<Response>
put bucket acl
putBucketPolicy(Map<String, dynamic> policy, {String? bucketName, CancelToken? cancelToken}) Future<Response>
put bucket policy
putObject(List<int> fileData, String fileKey, {CancelToken? cancelToken, PutRequestOption? option}) Future<Response>
upload object(file) to oss server fileData is the binary data that will send to oss server bucketName is optional, we use the default bucketName as we defined in Client
putObjectFile(String filepath, {PutRequestOption? option, CancelToken? cancelToken, String? fileKey}) Future<Response>
upload object(file) to oss server filepath is the filepath of the File that will send to oss server bucketName is optional, we use the default bucketName as we defined in Client
putObjectFiles(List<AssetFileEntity> assetEntities, {CancelToken? cancelToken}) Future<List<Response>>
upload object(files) to oss server assetEntities is list of files need to be uploaded to oss bucketName is optional, we use the default bucketName as we defined in Client
putObjects(List<AssetEntity> assetEntities, {CancelToken? cancelToken}) Future<List<Response>>
upload object(files) to oss server assetEntities is list of files need to be uploaded to oss bucketName is optional, we use the default bucketName as we defined in Client
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

init({String? stsUrl, required String ossEndpoint, required String bucketName, FutureOr<Auth> authGetter()?, Dio? dio}) Client