1.5.2 • Published 6 months ago

@lxdao/uploader3 v1.5.2

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

Uploader3

npm version npm downloads

Uploader3 is a React-based Web3 image upload component that supports multiple image uploads, image cropping, and uploading images to Web3 Storage providers (like IPFS). There are two ways for uploading, by using a backend API or the Uploader3 Connector.

Features

  • Supports cropping
  • Supports uploading to web3 service providers, such as NFT.storage

Usage

import { Uploader3 } from '@lxdao/uploader3';

Props

PropTypeDescriptionDefault
acceptstringimage accept file type['.png','.jpeg','.jpg','.gif', '.svg']
multiplebooleanmultiple image uploadfalse
apistringendpoint upload api url, post method''
headersobjecthttp headers to post api
connectorobjectcreate by uploader3-connector
cropCrop / booleancrop config, set false disabled croptrue
onChangefunctioncallback when files selected
onUploadfunctioncallback when file uploading
onCompletefunctioncallback when file uploaded
onCropEndfunctioncallback when crop end
onCropCancelfunctioncallback when crop cancel

api and connector are mutually exclusive, if both are provided, api will be used. must be provided one of them.

Types reference

Crop

type Crop = {
  size: { width: number; height: number };
  aspectRatio: number;
};
1.5.2

6 months ago

1.5.1

6 months ago

1.5.0

6 months ago

1.4.0

6 months ago

1.3.0

7 months ago

1.2.2

12 months ago

1.2.0

1 year ago

1.1.0

1 year ago

1.2.1

1 year ago

2.0.0

1 year ago

1.0.0

1 year ago

0.0.0

1 year ago