Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ piper Public

Pipe a file from one destination to the other using node.js

koelkast/piper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

USAGE

var Piper = require('./piper.js');

var test = new Piper({
	source: 'http://cachefly.cachefly.net/100mb.test', // SOURCE FILE
	target: 'http://localhost:8080/debug', // TARGET ENDPOINT
	name: 'upload' // NAME OF THE UPLOAD FIELD (defaults to file)
});


test.on('error', function(err) {
	console.log('error', errr);
});


test.on('progress', function(percentage) {
	console.log('progress (%) ', percentage);
});

test.on('complete', function(err, response, body) {
	if(!err) {
		console.log('response', body);
	} else {
		console.log('error', err);
	}
});

About

Pipe a file from one destination to the other using node.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published