Skip to content

myxvisual/ossr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

37 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

OSSR

npm package PeerDependencies Dependencies DevDependencies

Inistall

npm i -g ossr

Config

Simplify

ossr -i <accessKeyId> -s <accessKeySecret> -b <bucket>

Advance

ossr -i <accessKeyId> -s <accessKeySecret> -b <bucket> -e <endpoint> -r <region> -t <timeout>

CLI Usage

Graph

ossr ossr -l ossr -l folder/ list

Upload

Upload file to root pat

ossr ./localFile.jpg ------> https://xxxx/localFile.jpg

Upload folder to root path

ossr ./localFolder ------> https://xxxx/onlineFolder/<localFolder**>

Upload file with rename

ossr ./localFile.jpg customFolder/renamedFile.jpg ------> https://xxxx/customFolder/renamedFile.jpg

Upload folder with rename

ossr ./localFolder onlineFolder/ ------> https://xxxx/onlineFolder/<localFolder**> upload

Delete

ossr -d remoteFileOrFolder delete

Help

ossr -h

Module Usage

import * as ossr from "../bin/ossr";

async function test() {
    // ossr.setConfig({
    //     accessKeyId: "",
    //     accessKeySecret: ""
    // });

    let existRes = false;
    const uploadRes = await ossr.ossUpload("../bin", "ossr/");
    // console.log(uploadRes);
    existRes = await ossr.ossIsExist("ossr/ossr.js");
    // console.log(existRes);
    const deleteRes = await ossr.ossDelete("ossr/");
    // console.log("deleteRes", deleteRes);
}

test()

About

๐Ÿ“‚ An OSS object selector for CLI.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published