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

![GitHub](https://img.shields.io/github/license/69/bunnycdn-storage-js?style=flat-square) [![npm](https://img.shields.io/npm/v/bunnycdn-storage?style=flat-square)](https://www.npmjs.com/package/bunnycdn-storage)

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

bunnycdn-storage

GitHub npm

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;

// No region specified, defaults to Falkenstein (storage.bunnycdn.com)
const bunnyStorage = new BunnyStorage('API-KEY', 'STORAGE-ZONE-NAME');
// Specific region (ny.storage.bunnycdn.com)
const bunnyStorageRegion = new BunnyStorage('API-KEY', 'STORAGE-ZONE-NAME', 'ny');


// 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');

Disclaimer

Note that this project and the maintainer(s) of this repository are in no way, shape or form affiliated with BunnyCDN.

FAQs

Package last updated on 01 Mar 2024

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