📅  最后修改于: 2022-03-11 15:02:27.205000             🧑  作者: Mango
const download = require('image-downloader') const options = { url: 'http://someurl.com/image.jpg', dest: '/path/to/dest' // will be saved to /path/to/dest/image.jpg} download.image(options) .then(({ filename }) => { console.log('Saved to', filename) // saved to /path/to/dest/image.jpg }) .catch((err) => console.error(err))