Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/appgeist/get-file-from-url
Utility function to download a file from a specified URL
https://github.com/appgeist/get-file-from-url
download file nodejs promise server-side utilities
Last synced: 4 days ago
JSON representation
Utility function to download a file from a specified URL
- Host: GitHub
- URL: https://github.com/appgeist/get-file-from-url
- Owner: appgeist
- License: isc
- Created: 2019-07-09T08:54:59.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-02-12T09:19:03.000Z (almost 3 years ago)
- Last Synced: 2024-12-06T12:45:56.230Z (23 days ago)
- Topics: download, file, nodejs, promise, server-side, utilities
- Language: JavaScript
- Size: 174 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @appgeist/get-file-from-url
[![NPM version][npm-image]][npm-url]
[![License][license-image]][license-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
```js
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](LICENSE).
[npm-image]: https://img.shields.io/npm/v/@appgeist/get-file-from-url.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/@appgeist/get-file-from-url
[license-image]: https://img.shields.io/npm/l/@appgeist/get-file-from-url.svg?style=flat-square
[license-url]: LICENSE