Skip to content

mimoid-prog/react-file-upload

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@mimoid-prog/react-file-upload

React component for uploading files.

Live examples

https://codesandbox.io/s/mimoid-progreact-file-upload-playground-l7b22?file=/src/App.js

Installation

npm install @mimoid-prog/react-file-upload

or

yarn add @mimoid-prog/react-file-upload

Usage

import FileUpload from "@mimoid-prog/react-file-upload";

function App() {
  const handlePhotoChange = (photo) => {
    console.log(photo);
  };
  
  const handlePhotosChange = (photos) => {
    console.log(photos);
  }
  
  return (
    <div>
      <p>Single file upload</p>
      <FileUpload name="photo" onChange={handlePhotoChange} />
      <p>Multiple files upload</p>
      <FileUpload name="photos" onChange={handlePhotosChange} multiple />
    </div>
  );
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published