New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bunnycdn-storage

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bunnycdn-storage

a small wrapper for the bunnycdn storage api

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.1K
increased by9.24%
Maintainers
1
Weekly downloads
 
Created
Source

bunnycdn-storage

a small wrapper for the bunnycdn storage api

Building

install dependencies with npm/yarn and then run npm build or yarn build

Usage

const BunnyStorage = require('bunnycdn-storage').default;
const bunnyStorage = new BunnyStorage('API-KEY', 'STORAGE-ZONE-NAME');


// list all files in zone / path
const files = await bunnyStorage.list();
const filesInDir = await bunnyStorage.list('/images');

// upload a file from buffer or filename
bunnyStorage.upload('/tmp/bunny.jpg');
bunnyStorage.upload(fs.readFileSync('/tmp/bunny.jpg'), 'bunny.jpg')

// download a file from the servers
bunnyStorage.download('bunny.jpg'); // Buffer (default)
bunnyStorage.download('bunny.jpg', 'arraybuffer'); // Buffer
bunnyStorage.download('bunny.jpg', 'stream'); // ReadableStream

// delete a file
bunnyStorage.delete('bunny.jpg');

FAQs

Package last updated on 09 May 2020

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