save-with-correct-extension

1.0.2 • Public • Published

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.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    1
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i save-with-correct-extension

Weekly Downloads

1

Version

1.0.2

License

ISC

Last publish

Collaborators

  • josepedrodias