1.0.2 • Published 9 years ago

save-with-correct-extension v1.0.2

Weekly downloads
4
License
ISC
Repository
github
Last release
9 years ago

When the web server you're using lies on a resource's file extension and content-type, saveWithCorrectExtension() FTW!

install

npm install --save save-with-correct-extension

usage

// require the module
var saveWithCorrectExtension = require('save-with-correct-extension');

saveWithCorrectExtension(urlToFetch, localPathWithoutExtension, callback);
// the callback with be called with (err) in case of error or (null, localPathWithExtension) if everything went well

Check the example.js file for a practical example.