Skip to content

Instantly share code, notes, and snippets.

@fzaninotto
Created June 17, 2012 20:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fzaninotto/25fa2094d6cddbce3c6b to your computer and use it in GitHub Desktop.
Save fzaninotto/25fa2094d6cddbce3c6b to your computer and use it in GitHub Desktop.
var fs = require('fs');
var request = require('request');
var apiUrl = 'http://api.flickr.com/services/upload/';
fs.readdirSync(path).forEach(function(filename) {
fs.createReadStream(path + filename).pipe(request.post(apiUrl));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment