fix: cannot upload if there are no files
This commit is contained in:
parent
810948242f
commit
10610db63e
|
@ -257,7 +257,7 @@ const UploadFileForm = () => {
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
{!hasStarted && !isCompleted && !isUploading ? (
|
{!hasStarted && !isCompleted && !isUploading ? (
|
||||||
<Button size={"lg"} className="mt-6" onClick={upload}>
|
<Button size={"lg"} className="mt-6" onClick={upload} disabled={getFiles().length === 0}>
|
||||||
Upload
|
Upload
|
||||||
</Button>
|
</Button>
|
||||||
) : null}
|
) : null}
|
||||||
|
@ -265,10 +265,6 @@ const UploadFileForm = () => {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
function bytestoMegabytes(bytes: number) {
|
|
||||||
return bytes / 1024 / 1024;
|
|
||||||
}
|
|
||||||
|
|
||||||
const UploadFileItem = ({
|
const UploadFileItem = ({
|
||||||
file,
|
file,
|
||||||
failedState,
|
failedState,
|
||||||
|
|
Loading…
Reference in New Issue