JSPM

react-file-upload-preview

0.1.5
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 8
    • Score
      100M100P100Q32651F

    A powerful React component for previewing uploaded files before they are submitted. Enhance user experience with instant file previews and customizable display options.

    Package Exports

      This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-file-upload-preview) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

      Readme

      Note -> Install v0.1.4 or above

      Usage

      Install

      npm install react-file-upload-preview@0.1.4

      Import

      import { FileUpload } from 'react-file-upload-preview/dist';

      Usage

      <FileUpload handleFileUpload={(e)=>console.log(e, event)} accept=".jpg, .png" />

      Demo

      Demo Image

      prop type usage
      handleFileUpload function to get the event for the file uploaded
      inputId string input id for your input field
      accept string restrict types of file you want to upload
      uploadTriggerClasses string to add css to upload icon
      labelContainerClasses string to add css to label container
      customPreviewUrl string custom Preview URL
      customFileType string to initialize and prefill the image/video/pdf
      customUploadIcon string custom upload icon URL