
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.
react-folder-dropzone
Advanced tools
A React component for uploading images and folders with drag-and-drop support
A flexible React component to upload images and folders with support for drag & drop, file previews, and folder hierarchy.
✅ Upload entire folders
✅ Preserves relative paths
✅ Drag & Drop support
✅ No dependencies beyond React
npm install react-folder-dropzone
Or using yarn:
yarn add react-folder-dropzone
import React, { useState } from 'react';
import Uploader from 'react-folder-dropzone';
const App = () => {
const [files, setFiles] = useState([]);
const handleUploadComplete = (uploadedFiles) => {
setFiles(uploadedFiles);
console.log('Files received:', uploadedFiles);
};
return (
<div className="max-w-xl mx-auto p-6">
<Uploader onUploadComplete={handleUploadComplete} />
</div>
);
};
export default App;
| Prop Name | Type | Default Value | Description |
|---|---|---|---|
onUploadComplete | Function | undefined | Callback triggered with all processed files |
fileTypes | String | 'image/*' | Accept only specific MIME types |
showButtons | Boolean | true | Toggle visibility of file/folder buttons |
dragLabel | String | 'Drag & drop your images or folders here' | Label inside the drag-and-drop box |
buttonLabels | Object | { file: 'Upload Files', folder: 'Upload Folder' } | Custom text for upload buttons |
containerClass | String | '' | Custom container CSS/Tailwind class |
dragClass | String | '' | Custom class for drag-and-drop box |
The onUploadComplete callback receives an array of file objects:
[
{
name: 'image.jpg',
type: 'image/jpeg',
relativePath: 'photos/image.jpg',
url: 'blob:http://localhost/abc-xyz'
},
...
]
relativePath: Full path including folder namesurl: A blob URL to preview or use in the browser✅ Folder uploads supported using:
webkitdirectory inputwebkitGetAsEntry⚠️ Firefox does not support folder drag uploads due to browser limitations.
<Uploader
dragClass="bg-green-50 border-green-400"
containerClass="bg-white p-6 shadow-md rounded"
/>
Use Tailwind or your own class names.
react-folder-image-uploader/
├── dist/ # Compiled library files
├── src/
│ └── Uploader.js # Main component
├── package.json
├── vite.config.js
└── README.md
Install dev dependencies:
npm install
Then run:
npm run build
Bundled output will be saved to the dist/ folder.
MIT License © Faizul Hassan Rhine
Made with ❤️ by Faizul Hassan Rhine
GitHub: [https://github.com/FaizulHassan-Rhine]
Feel free to open issues or submit pull requests! Let’s improve it together 💪
FAQs
A React component for uploading images and folders with drag-and-drop support
We found that react-folder-dropzone demonstrated a healthy version release cadence and project activity because the last version was released less than 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.

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.