Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@appvitalinc/file-upload-widget-api-react
Advanced tools
React wrapper library to quickly integrate Appvital File picker & cloud uploader in your application with just few lines of code.
React wrapper library to quickly integrate Appvital File picker & cloud uploader in your application with just few lines of code.
See file upload widget in action here with example configurations demonstrating various features.
Install it through NPM
npm install @appvitalinc/file-upload-widget-api-react
import { ApvFilePicker } from '@appvitalinc/file-upload-widget-api-react';
const MyComponent = () => {
return (
<ApvFilePicker
apikey={'apiKey'}
/>
)
}
Name | Type | Required | Default | Description |
---|---|---|---|---|
apikey | String | True | Filepicker api key | |
options | ApvFilePickerOptions | Check ApvFilePickerOptions |
Name | Function | Required | Default | Description |
---|---|---|---|---|
onOpen | () | Fires when filepicker has been initialized and is ready. | ||
onClose | () | Fires when filepicker popup is closed. | ||
onCancel | () | Fires when filepicker is canceled. | ||
onUploadStarted | () | Fires when file(s) uploading starts. | ||
onUploadDone | (ApvFilePickerResponse) | Fires when uploading completes. | ||
onUploadError | (error) | Fires when file(s) upload is failed. |
Below you can find some quick basic implementations.
import { ApvFilePicker } from '@appvitalinc/file-upload-widget-api-react';
const MyComponent = () => {
const apikey = 'YOUR_API_KEY';
const options = {
multiple: false,
outputfileoptions: {
width: 500,
height: 281,
resizetype: "fit",
resizeconflict: "pad",
storage: [
{
name: "AWS-S3-Storage-Demo",
path: "/file-picker-demo/",
},
],
},
inputfileoptions: {
allowedfileformats: "jpg,jpeg,gif,bmp,png,webp,zip,pdf",
maxfilesize: 700000000,
note:
"File size restricted to: 10000 KB / File type restricted to: JPG, PNG, JPEG, PDF, DOC, DOCX, TXT, XML and ZIP.",
},
};
};
onOpen = () => {
console.log('Modal open');
}
onClose = () => {
console.log('Modal Close');
}
onCancel = () => {
console.log('On Cancel');
}
onUploadDone = (data) => {
console.log('onUploadStart', data);
}
onUploadStart = () => {
console.log('onUploadStart');
}
onUploadError = (data) => {
console.log('onUploadError', data);
}
return (
<ApvFilePicker
apiKey={apikey}
options={options}
onOpen={onOpen}
onClose={onClose}
onCancel={onCancel}
onUploadDone={onUploadDone}
onUploadStarted={onUploadStart}
onUploadError={onUploadError}
/>
);
}
You can find further documentation about available filepicker options and configuration details here at https://appvital.com/docs/file-picker#Quickstart-React
Any of your contributions or ideas are more than welcome. Please consider that we follow the conventional commits specification to ensure consistent commit messages and changelog formatting.
FAQs
React wrapper library to quickly integrate Appvital File picker & cloud uploader in your application with just few lines of code.
The npm package @appvitalinc/file-upload-widget-api-react receives a total of 1 weekly downloads. As such, @appvitalinc/file-upload-widget-api-react popularity was classified as not popular.
We found that @appvitalinc/file-upload-widget-api-react 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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.