![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@uploadcare/react-uploader
Advanced tools
Welcome to the Uploadcare React Uploader documentation! This library allows you to seamlessly integrate Uploadcare file uploader into your React applications while adhering to React principles.
This documentation provides guidance on how to use the Uploadcare React Uploader in your projects, along with details about its features, installation process, usage examples, customization options, event handling, and security considerations.
npm i @uploadcare/react-uploader
The Uploadcare React Uploader offers three main components for integration. Each component serves specific use cases and can be easily implemented into your project.
import { FileUploaderRegular } from "@uploadcare/react-uploader";
import "@uploadcare/react-adapter/core.css";
<FileUploaderRegular pubkey="YOUR_PUBLIC_KEY"/>;
import { FileUploaderInline } from "@uploadcare/react-uploader";
import "@uploadcare/react-adapter/core.css";
<FileUploaderInline pubkey="YOUR_PUBLIC_KEY"/>;
import { FileUploaderMinimal } from "@uploadcare/react-uploader";
import "@uploadcare/react-adapter/core.css";
<FileUploaderMinimal pubkey="YOUR_PUBLIC_KEY"/>;
An easy way to connect React-Uploader to your project and utilize the available API props. We provide a full set of props that are used in blocks. For review we suggest you to look at the documentation.
You can customize the appearance of the React uploader using the className prop, which allows you to add custom CSS
classes to the uploader FileUploader[Regular | Minimal | Inline]
wrapper.
import { FileUploaderRegular } from "@uploadcare/react-uploader";
import "@uploadcare/react-adapter/core.css";
<FileUploaderRegular className="fileUploaderWrapper" pubkey="YOUR_PUBLIC_KEY"/>;
.fileUploaderWrapper lr-file-uploader-regular {
}
For convenience, we provide the ability to access the File Uploader API using apiRef
.
You can see what methods are available in apiRef
in the documentation.
It is important to note that we now pass all InstanceType from UploadCtxProvider.
import React, {useRef, useEffect} from "react";
import {
FileUploaderRegular,
UploadCtxProvider
} from "@uploadcare/react-uploader";
import "@uploadcare/react-adapter/core.css";
const Example = () => {
const uploaderRef = useRef < InstanceType < UploadCtxProvider > | null > (null);
<FileUploaderRegular apiRef={uploaderRef} pubkey="YOUR_PUBLIC_KEY"/>;
}
Events in React Uploader are the same as in blocks, see the documentation. The principle of converting events from blocks to React Uploader:
on
.camelCase
.Example:
import { FileUploaderRegular } from "@uploadcare/react-uploader";
import "@uploadcare/react-adapter/core.css";
<FileUploaderRegular
pubkey="YOUR_PUBLIC_KEY"
onModalOpen={() => {
console.log('modal-open')
}}
/>
Events blocks | Events React Uploader |
---|---|
file-added | onFileAdded |
file-removed | onFileRemoved |
file-upload-start | onFileUploadStart |
file-upload-progress | onFileUploadProgress |
file-upload-success | onFileUploadSuccess |
file-upload-failed | onFileUploadFailed |
file-url-changed | onFileUrlChanged |
modal-open | onModalOpen |
modal-close | onModalClose |
done-click | onDoneClick |
upload-click | onUploadClick |
activity-change | onActivityChange |
common-upload-start | onCommonUploadStart |
common-upload-progress | onCommonUploadProgress |
common-upload-success | onCommonUploadSuccess |
common-upload-failed | onCommonUploadFailed |
change | onChange |
group-created | onGroupCreated |
If you think you ran into something in Uploadcare libraries that might have security implications, please hit us up at bugbounty@uploadcare.com or Hackerone.
We'll contact you personally in a short time to fix an issue through co-op and prior to any public disclosure.
Issues and PRs are welcome. You can provide your feedback or drop us a support request at hello@uploadcare.com.
FAQs
React component for file uploads using Uploadcare
The npm package @uploadcare/react-uploader receives a total of 3,216 weekly downloads. As such, @uploadcare/react-uploader popularity was classified as popular.
We found that @uploadcare/react-uploader demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 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
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.