Wether multiple file upload is allowed or not.
Array of files to show when uploader element appears.
Executed when user wants to remove a file.
Receives unique file ID fileId
.
This function is usually used to remove a specific file from file system.
Executed when file is uploaded. This function contains uploaded file as the first element of files array and must return a unique file ID. This unique ID is then can be used to revert uploads.
<drayman-file-uploader />
File uploader powered by FilePond library.
Example of usage
export const component: DraymanComponent = async ({ forceUpdate }) => { let file; return () => ( <div> <drayman-file-uploader onUpload={async (_, [uploadedFile]) => { file = uploadedFile; await forceUpdate(); return '123'; }} /> {file && <img src={`data:${file.mimetype};base64,${file.buffer.toString('base64')}`} style={{ width: '200px;' }} />} </div> ) }