Skip to content

Instantly share code, notes, and snippets.

@senthilmpro
senthilmpro / download-file-axios-nodejs.js
Last active August 2, 2024 13:33
Download File using axios : Node.js program
'use strict'
const Fs = require('fs')
const Path = require('path')
const Axios = require('axios')
async function downloadImage () {
const url = 'https://unsplash.com/photos/AaEQmoufHLk/download?force=true'
const path = Path.resolve(__dirname, 'images', 'code1.jpg')