
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
axios-file
Advanced tools
node 中在 axios 基础上实现文件的上传和下载
npm install axios-file
const axiosFile = require('axios-file');
// 直接将 stream 传入即可
const data = {
name: 'test',
file: fs.createReadStream('./test.png')
};
await axiosFile({
url: 'http://xxx.xxx/test',
method: 'post',
headers: {
'cache-control': 'no-cache'
},
data: data
});
const axiosFile = require('axios-file');
// 下载文件并保存至指定的文件中
// savePath 必须存在,否则将走 axios 的默认规则
await axiosFile({
url: 'http://xxx.xxx/file',
method: 'get',
savePath: `${__dirname}/test.png`
});
FAQs
axios post formdata and download file
The npm package axios-file receives a total of 159 weekly downloads. As such, axios-file popularity was classified as not popular.
We found that axios-file demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.