mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 17:08:34 +00:00
undefined file change
This commit is contained in:
parent
eab16ab7bc
commit
af3b51c888
1 changed files with 3 additions and 0 deletions
|
|
@ -61,6 +61,9 @@ export function FileDropzone({
|
|||
onChange={(e) => {
|
||||
const file = e.target.files[0];
|
||||
setFileData(file);
|
||||
if (file === undefined) {
|
||||
setFileUpload(false);
|
||||
}
|
||||
if (Math.round(file.size / 1024) > 1024) {
|
||||
toast.error('File size cannot exceed more than 1MB');
|
||||
e.target.value = null;
|
||||
|
|
|
|||
Loading…
Reference in a new issue