
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
file-chunkify
Advanced tools
A lightweight file chunking utility for splitting and merging large files across different environments.
Install via npm:
npm install file-chunkify
Use splitFile to break a large file into chunks before processing:
import { splitFile } from "file-chunkify";
const fileInput = document.querySelector("input[type='file']");
fileInput.addEventListener("change", async (event) => {
const file = event.target.files[0];
for await (const chunkInfo of splitFile({
file,
chunkSize: 5 * 1024 * 1024,
})) {
console.log("Processing chunk", chunkInfo);
// Send chunkInfo.chunk to the storage or processing pipeline
}
});
Use saveChunk to store received chunks and merge them when all are received:
import { saveChunk } from "file-chunkify";
import express from "express";
import multer from "multer";
const app = express();
const upload = multer();
app.post("/upload", upload.single("chunk"), async (req, res) => {
const { chunkNumber, totalChunks } = req.body;
const result = await saveChunk({
file: req.file,
chunkNumber: Number(chunkNumber),
totalChunks: Number(totalChunks),
options: { debugMode: true }, // Example usage of debugger
});
res.json(result);
});
app.listen(3000, () => console.log("Server running on port 3000"));
Splits a file into chunks.
| Name | Type | Default | Description |
|---|---|---|---|
| file | File | Required | The file to be split. |
| chunkSize | number | 5MB | The size of each chunk. |
| options | object | Optional | Additional options, including debugMode. |
An async generator yielding objects with:
chunk: A file slice (File)chunkNumber: The current chunk numbertotalChunks: Total number of chunksfileName: A generated UUID-based file nameprogress: Split progress in %Saves uploaded chunks and merges them when all are received.
| Name | Type | Default | Description |
|---|---|---|---|
| file | Express.Multer.File | Required | The uploaded chunk file. |
| chunkNumber | number | Required | The current chunk number. |
| totalChunks | number | Required | The total number of chunks. |
| outputDir | string | ./uploads | Directory to store merged files. |
| chunkDir | string | ./uploads/chunks | Directory to store chunk files. |
| options | object | Optional | Additional options, including debugMode. |
| Name | Type | Description |
|---|---|---|
| success | boolean | Indicates if the operation was successful. |
| message | string | A status message. |
| mergedFilePath | string? | The path of the merged file (if applicable). |
MIT License © 2025 Ahmad Al-Zein
FAQs
File Chunkify
We found that file-chunkify demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.