A lightweight Node.js library built on top of axios that simplifies file uploads via FormData and file downloads to disk. Version 1.0.17 is the latest stable release. It allows passing streams directly for upload and requires an existing savePath for downloads. Compared to alternatives like form-data or axios alone, it provides a unified API for both upload and download operations with minimal configuration.
npm install axios-fileNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates file upload using a readable stream and file download to a specified path.
Ensure the directory specified in savePath exists before download.
Use fs.createReadStream for file fields.
Consider using axios directly with form-data for uploads.
Run 'npm install axios-file' and ensure import is correct: require('axios-file') or import axiosFile from 'axios-file'.Use 'const axiosFile = require('axios-file');' instead of 'const { axiosFile } = require('axios-file');'.Create the directory before calling axiosFile, e.g., mkdirSync(dirname(savePath), { recursive: true }).