@cloudflare/util-http-file

Cloudflare HTTP File Util

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
@cloudflare/util-http-file
Minified + gzip package size for @cloudflare/util-http-file in KB

Readme

cf-util-http-file

Cloudflare HTTP File Util

Installation

$ npm install cf-util-http-file

Usage

upload('/api/upload-file', fileInput.files[0], res => {
  console.log('Success!');
}, err => {
  console.log('Failed!');
});
download('/api/download-file', 'filename.txt', res => {
  console.log('Success!');
}, err => {
  console.log('Failed!');
});

Note: This is only really meant for plain text files, it might work with other stuff but don't expect it to.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.