New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

tmpdl

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tmpdl

Download a remote file to a temporary location

latest
Source
npmnpm
Version
4.0.0
Version published
Maintainers
1
Created
Source

tmpdl

Version Build Status Coveralls npm License

Download a remote file to a temporary location.

Installation

npm install --save tmpdl

Usage

const tmpdl = require('tmpdl')

try {
  const filepath = await tmpdl('http://www.example.com/some-awesome-image.jpg')

  // remote file successfully downloaded and stored
} catch (err) {
  // something went wrong
}

tmpdl will return a promise which will resolve to the path of the saved file. Any errors that occur during the download of the file, or the creation of the temporary directory that the remote file will be stored in, will cause the promise to reject.

Keywords

download

FAQs

Package last updated on 11 Apr 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts