Skip to main content

Uploader

Uploader Component

Manages file uploads for Matchplat applications.
Uploads files (as Blob) from the user's computer to MS Azure containers.

import { Uploader } from "@matchplat/crono";

You can view the specific properties of the component from CronoUI, in the category Logical Components.

The component is configured to operate without settings.
You need to know the name of the container where to load the file and pass it to the component through the uploaderContainerName prop.
It is also possible with the isMultiple prop to choose if the user can load multiple files.

The component uses a callback function uploadStatusNotifier to know if the upload is complete. Pass a React State with boolean value to it.

You can add a prefix to every file name by using the prefix prop.

There is no need to install API or WebSockets, because they are automatically managed by the component.

caution

Install CronoBoost and CronoUser first!

Where to use the Component

You can use this container where is needed without any limitations.

import { Box, Uploader } from "@matchplat/crono";

const [doneUpload, setDoneUpload] = useState(false);

<Box alignItems="center">
<Uploader
prefix={idCampaign}
uploadStatusNotifier={setDoneUpload}
uploaderContainerName="name-of-the-container"
isMultiple
/>
</Box>;