You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

node-selectel-manager

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-selectel-manager

The library provides API for some Selectel storage options. Supported functions:

1.0.1
latest
Source
npm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

node-selectel-manager

The library provides API for some Selectel storage options. Supported functions:

  • Get container files;
  • Delete file;
  • Upload file;
  • Create container;

Installation

npm install node-selectel-manager

Usage

const fs = require('fs');
const manager = require('./index')({
	login: 'xxx',
	password: 'xxx'
});

const file = fs.readFileSync('/home/user/Downloads/archive.tar.gz');

manager
	.createContainer('test', {'X-Container-Meta-Type': 'public'})
	.then(() => {
		return manager.uploadFile(file, 'test/sub-folder/', 'tar.gz');
	})
	.then(() => {
		return manager.clearCache(['http://xxx.selcdn.com/test/cached-file.jpg']);
	})
	.then(() => {
		return manager.getContainerFiles('test');
	})
	.then(res => console.log(res.body, res.headers)).catch(console.log)

License

MIT

Keywords

selectel

FAQs

Package last updated on 28 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts