@appgeist/get-file-from-url
v1.1.3
Published
Utility function to download a file from a specified URL and return a Promise when done
Downloads
17
Maintainers
Readme
@appgeist/get-file-from-url
Utility function to download a file from a specified URL. Returns a Promise that fulfills with the local file name upon download completion.
Usage
const getFileFromUrl = require("@appgeist/get-file-from-url");
const localFileName = await getFileFromUrl({
url: "https://example.com/catz-picture.jpg",
file: "/path/to/local-catz-picture.jpg"
});
console.log(localFileName); // -> "/path/to/local-catz-picture.jpg"
License
The ISC License.