Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cos-cnpm

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cos-cnpm

tencent-cloud cos wrapper for cnpm

  • 2.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

cos-cnpm

fs storage wrapper for cnpm

Installation

$ npm install cos-cnpm

Warning!!!

Only support singleton. Don't initialize two cos-cnpm instance.

Usage

import COSClient from 'cos-cnpm';

config.nfs = {
  client: new COSClient({
    secretId: '',
    secretKey: '',
    bucket: '',
    region: '',
  }),
  // dir: join(config.dataDir, 'nfs'),
};

API

All the APIs are following cnpm nfs guide.

  • upload: upload a file from filepath

  • uploadBuffer: upload a file from buffer

  • download: download file by key

  • remove: remove file by key

  • uploadBytes: upload bytes

  • appendBytes: append bytes

  • readBytes: read bytes

  • list: list files by prefix

  • url: get download url

  • urls: get download urls

License

MIT

Keywords

FAQs

Package last updated on 21 Sep 2022

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc