@asurraa/sura-ui-upload
v1.0.21
Published
Upload Wrapper
Downloads
35
Keywords
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}
/>