Skip to content

Latest commit

 

History

History

react-uploader-adapter

Uploadcare logo

WebsiteQuick StartDocsBlogDiscordTwitter

React file uploading example

Edit react-uploader

This is an example project of implementing a file uploader in a Next.js application with Uploadcare React Uploader

Run this demo locally

# clone this repo and go to the cloned folder

$ cd examples/react-uploader-adapter

$ npm install
# or `yarn install`, if you wish

$ npm run start
# or `yarn start`

Installation

All you need to do is to install @uploadcare/react-uploader from npm via your favorite Node package manager.

Read more about installation in the Uploadcare documentation.

Configuration

Please, read the File Uploader documentation.

Integration notes

File Uploader is native to the Web but not to React. It's easy to use File Uploader in a React app, but note that a part of your solution will encapsulate non-React code.

E.g. in one of the examples we created a FileUploader component which provides React-friendly API for the rest of the view. There is a File Uploader inside this component and nowhere else.

Styling

If your styling solution may provide class string or style object, feel free to use them on components like uc-file-uploader-regular and override default class using CSS variables.

Otherwise you may go “full override” way and pass a string with styles to a File Uploader type of your choice.

Read more about styling in the File Uploader docs.

Contribution

You’re always welcome to contribute:

  • Create issues every time you feel something is missing or goes wrong.
  • Provide your feedback or drop us a support request at hello@uploadcare.com.
  • Ask questions on Stack Overflow with "uploadcare" tag if others can have these questions as well.
  • Star this repo if you like it ⭐️