Closed davibennun closed 1 month ago
It can be set via the addFileFromUuid
method (see Uploader API). Here's an example:
function App() {
const uploaderRef = useRef<InstanceType<UploadCtxProvider> | null>(null);
useEffect(() => {
const api = uploaderRef.current?.getAPI();
api?.addFileFromUuid(uuid, { // uuid – UUID of a file you want to pre-load
silent: true,
});
}, []);
return (
<>
<FileUploaderMinimal apiRef={uploaderRef} pubkey="demopublickey" />
</>
);
}
Set initial value for the uploader widget
Is there a way to set the initial value with any of the uploaders, more specifically, the Minimal one? If not, could anyone please direct me on how it can be done?
Thanks!