File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed
Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,18 @@ const ossOptions: OSS.Options = {
1010
1111const client = new OSS ( ossOptions ) ;
1212
13+ client . putSymlink ( "newfile.png" , "sourcefile.png" ) ;
14+ client . putSymlink ( "newfile.png" , "sourcefile.png" , {
15+ storageClass : "IA" ,
16+ meta : {
17+ uid : 1 ,
18+ pid : 0 ,
19+ } ,
20+ } ) ;
21+
22+ client . getSymlink ( "newfile.png" ) ;
23+ client . getSymlink ( "newfile.png" , { versionId : "123" } ) ;
24+
1325client . listV2 ( { "max-keys" : 1000 } ) ;
1426client . copy ( "newfile.png" , "sourcefile.png" ) ;
1527client . copy ( "newfile.png" , "sourcefile.png" , { timeout : 1000 } ) ;
Original file line number Diff line number Diff line change @@ -581,6 +581,15 @@ declare namespace OSS {
581581 uploads : Upload [ ] ;
582582 }
583583
584+ interface PutSymlinkOptions {
585+ /** the storage type include (Standard,IA,Archive) */
586+ storageClass ?: string | undefined ;
587+ /** user meta, will send with x-oss-meta- prefix string */
588+ meta ?: UserMeta | undefined ;
589+ /** extra headers */
590+ headers ?: object | undefined ;
591+ }
592+
584593 interface PutChannelConf {
585594 Description ?: string | undefined ;
586595 Status ?: string | undefined ;
@@ -1210,6 +1219,23 @@ declare class OSS {
12101219 policy : object | string ,
12111220 ) : OSS . PostObjectParams ;
12121221
1222+ /**
1223+ * put symlink
1224+ */
1225+ putSymlink (
1226+ name : string ,
1227+ targetName : string ,
1228+ options ?: OSS . PutSymlinkOptions ,
1229+ ) : Promise < { res : OSS . NormalSuccessResponse } > ;
1230+
1231+ /**
1232+ * get symlink
1233+ */
1234+ getSymlink (
1235+ name : string ,
1236+ options ?: { versionId ?: string | undefined ; timeout ?: number | undefined ; headers ?: object | undefined } ,
1237+ ) : Promise < { targetName : string ; res : OSS . NormalSuccessResponse } > ;
1238+
12131239 /************************************************ RTMP Operations *************************************************************/
12141240 /**
12151241 * Create a live channel.
You can’t perform that action at this time.
0 commit comments