0.0.2 • Published 8 years ago
pack-util-http-file v0.0.2
pack-util-http-file
Pack HTTP File Util
Installation
$ npm install pack-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.
0.0.2
8 years ago