File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -147,3 +147,15 @@ const userMeta: OSS.UserMeta = {
147147 pid : 0 ,
148148 anything : "anything" ,
149149} ;
150+
151+ // $ExpectType void
152+ client . cancel ( ) ;
153+
154+ // $ExpectType void
155+ client . cancel ( { name : "object-name" , uploadId : "upload-id" } ) ;
156+
157+ // $ExpectType void
158+ client . cancel ( { name : "object-name" , uploadId : "upload-id" , options : { timeout : 1000 } } ) ;
159+
160+ // $ExpectType boolean
161+ client . isCancel ( ) ;
Original file line number Diff line number Diff line change @@ -1209,6 +1209,17 @@ declare class OSS {
12091209 options ?: OSS . RequestOptions ,
12101210 ) : Promise < OSS . NormalSuccessResponse > ;
12111211
1212+ /**
1213+ * Cancel the current multipart upload operation.
1214+ * If abort is provided, it will also call abortMultipartUpload.
1215+ */
1216+ cancel ( abort ?: { name : string ; uploadId : string ; options ?: OSS . RequestOptions } ) : void ;
1217+
1218+ /**
1219+ * Check if the upload has been cancelled.
1220+ */
1221+ isCancel ( ) : boolean ;
1222+
12121223 /**
12131224 * get postObject params.
12141225 */
You can’t perform that action at this time.
0 commit comments