
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
vfs-upload-widget
Advanced tools
npm install egov-upload-widget
import 'egov-upload-widget/styles';
![]()
The Avatar Uploader component allows users to upload and display avatars in your React application.
import Avatar from 'egov-upload-widget/avatar';
//or
import Avatar from 'egov-upload-widget/avatar-circle';
<Avatar
project="project_name"
name="avatar"
value="https://example.com/avatar.jpg"
maxFileSize={1048576} // 1MB
onChange={(e) => console.log(e.target.value)}
onDelete={() => {}}
customRender={<CustomAvatarComponent />}
/>
import React, { useState } from 'react';
import Avatar from 'egov-upload-widget/avatar';
const App = () => {
const [value, setValue] = useState('');
const onHandleChange = (e) => {
setValue(e.target.value.url);
};
return (
<div>
<Avatar
project="project_name"
name="avatar"
value={value}
maxFileSize={5242880} // 5MB
onchange={onHandleChange}
/>
</div>
);
};
export default App;
customRender PropThe customRender prop allows you to specify a custom React component for rendering the avatar. This gives you full control over the appearance and behavior of the avatar component. The custom component will receive the following props:
import React from 'react';
const CustomAvatarComponent = ({
onToggleMenu,
data,
progressPercentage,
error,
isShowMenu,
setIsShowMenu,
onHandleDelete,
MenuComponent
}) => {
return (
...
)
}
const App = () => {
return (
<Avatar
project="project_name"
name="avatar"
value={avatarUrl}
maxFileSize={5242880} // 5MB
onchange={onHandleChange}
customRender={(props) => (
<CustomAvatarComponent />
)}
/>
);
};
export default App;

The Single File Uploader component allows users to upload and display file in your React application.
import File from 'egov-upload-widget/file';
<File
project="project_name"
name="file"
value={{
file_name: 'file.jpg',
url: 'https://example.com/file.jpg',
mime_type: 'application/jpeg'
}}
maxFileSize={1048576} // 1MB
onchange={(e) => console.log(e.target.value.url)}
customRender={<CustomAvatarComponent />}
/>
import React, { useState } from 'react';
import File from 'egov-upload-widget/file';
const App = () => {
const [value, setValue] = useState('');
const onHandleChange = (e) => {
setValue(e.target.value);
};
return (
<div>
<File
project="project_name"
name="file"
value={value}
maxFileSize={5242880} // 5MB
onchange={onHandleChange}
/>
</div>
);
};
export default App;
customRender PropThe customRender prop allows you to specify a custom React component for rendering the file. This gives you full control over the appearance and behavior of the file component. The custom component will receive the following props:
import React from 'react';
const CustomFileComponent = ({
onToggleMenu,
data,
progressPercentage,
error,
isShowMenu,
setIsShowMenu,
onHandleDelete,
MenuComponent
}) => {
return (
...
)
}
const App = () => {
return (
<File
project="project_name"
name="file"
value={value}
maxFileSize={5242880} // 5MB
onchange={onHandleChange}
customRender={(props) => (
<CustomFileComponent />
)}
/>
);
};
export default App;

The Multiple File Uploader component allows users to upload and display files in your React application.
import Files from 'egov-upload-widget/files';
<Files
project="project_name"
name="files"
value={[
{
file_name: 'file.jpg',
url: 'https://example.com/file.jpg',
mime_type: 'application/jpeg'
},
{
file_name: 'file2.jpg',
url: 'https://example.com/file2.jpg',
mime_type: 'application/jpeg'
},
{
file_name: 'file3.pdf',
url: 'https://example.com/file3.jpg',
mime_type: 'application/pdf'
}
]}
maxFileSize={1048576} // 1MB
onchange={(e) => {
//array of files
console.log(e.target.value)
}}
customRender={<CustomAvatarComponent />}
/>
import React, { useState } from 'react';
import Files from 'egov-upload-widget/files';
const App = () => {
const [value, setValue] = useState('');
const onHandleChange = (e) => {
//array of files
setValue(e.target.value);
};
return (
<div>
<Files
project="project_name"
name="files"
value={value}
maxFileSize={5242880} // 5MB
onchange={onHandleChange}
/>
</div>
);
};
export default App;
customRender PropThe customRender prop allows you to specify a custom React component for rendering the file. This gives you full control over the appearance and behavior of the file component. The custom component will receive the following props:
import React from 'react';
const CustomFileComponent = ({
onToggleMenu,
data,
progressPercentage,
error,
isShowMenu,
setIsShowMenu,
onHandleDelete,
MenuComponent
}) => {
return (
...
)
}
const App = () => {
return (
<Files
project="project_name"
name="files"
value={value}
maxFileSize={5242880} // 5MB
onchange={onHandleChange}
customRender={(props) => (
<CustomFileComponent />
)}
/>
);
};
export default App;
FAQs
VFS upload widget for reactjs
The npm package vfs-upload-widget receives a total of 8 weekly downloads. As such, vfs-upload-widget popularity was classified as not popular.
We found that vfs-upload-widget 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.