ks-yun

ksyun sdk

Usage no npm install needed!

<script type="module">
  import ksYun from 'https://cdn.skypack.dev/ks-yun';
</script>

README

Better KS3 NodeJS SDK

Install

npm install ks-yun --save [-g]

Usage

Getting Started

NodeJS

'use strict';

let Ksyun = require('ks-yun');

//upload all files under ./local/path to <BucketName>/remote/destination on ks3
let ksyun = new Ksyun('<YourAccessKey>', '<YourSecretKey>');
ksyun.uploadFiles('<BucketName>', './local/path', 'remote/destination', Ksyun.ACL.PUBLIC_READ);

Command line

You must install ks-yun globally first.

ksyun -h
Usage: ksyun [options] [command]


  Commands:

    init [options] <AK> <SK>                              initialize access key and secret key, support multiple account
    upload [options] <Bucket> <RemotePath> <LocalPath>    upload local file/folder to ks3
    download [options] <Bucket> <RemotePath> <LocalPath>  download ks3 file/folder to local
    list [options] <Bucket> [RemoteFolder]                list all files under remote folder
    remove [options] <Bucket> <RemotePath>                remove ks3 file/folder
    delete [options] <UrlOrKsyunID>                       delete shared link

  Options:

    -h, --help     output usage information
    -V, --version  output the version number