@tenbox-dev/sura-ui-upload
v1.0.2
Published
# basic
Downloads
3
Readme
@sura-upload
basic
Provider
<AsurRaaUploadProvider
header={{ authorization: `Bearer ${token}` }}
postUrl={`${BASE_API_URL}${REST_URI_ENUM.UPLOAD_SINGLE_IMAGE}`}
>
<App />
</AsurRaaUploadProvider>
Components usage
<AsurRaaSingleUpload
defaultImage={editableData?.avatar}
getReturnUrl={(img: uploadInterface) => {
setImageState(img?.uuid);
}}
/>
Return Image back
<Image
preview={isError ? false : props.isPreview}
draggable={false}
src={getReturnSingleImageFromServer(props.value)}
width={100}
fallback={defaultImage}
/>