React
import { Uploader } from '@dropkit/react';
export function Avatar() { return ( <Uploader key="pk_live_..." accept="image/*" onUploaded={(file) => console.log(file.url)} /> );}Props
| prop | type | default |
|---|---|---|
key | string | required |
endpoint | string | https://dropkit.app |
accept | string | any |
multiple | boolean | false |
maxSize | number | none |
onUploaded | (file) => void | noop |
onError | (msg) => void | noop |
metadata | Record<string, string> | none |