mirror of
https://github.com/gradio-app/gradio.git
synced 2024-11-21 01:01:05 +08:00
fix upload file delay (#4661)
* fix * changes * changes --------- Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
This commit is contained in:
parent
9e13cf3890
commit
7b8fbb17c8
@ -18,6 +18,7 @@
|
||||
- Fixed Dropdown height rendering in Columns by [@aliabid94](https://github.com/aliabid94) in [PR 4584](https://github.com/gradio-app/gradio/pull/4584)
|
||||
- Fixed bug where `AnnotatedImage` css styling was causing the annotation masks to not be displayed correctly by [@freddyaboulton](https://github.com/freddyaboulton) in [PR 4628](https://github.com/gradio-app/gradio/pull/4628)
|
||||
- Ensure that Gradio does not silently fail when running on a port that is occupied by [@abidlabs](https://github.com/abidlabs) in [PR 4624](https://github.com/gradio-app/gradio/pull/4624).
|
||||
- Fix double upload bug that caused lag in file uploads by [@aliabid94](https://github.com/aliabid94) in [PR 4661](https://github.com/gradio-app/gradio/pull/4661)
|
||||
|
||||
## Other Changes:
|
||||
|
||||
|
@ -71,6 +71,7 @@
|
||||
(Array.isArray(_value) ? _value : [_value]).forEach(
|
||||
async (file_data, i) => {
|
||||
file_data.data = await blobToBase64(file_data.blob!);
|
||||
file_data.blob = undefined;
|
||||
}
|
||||
);
|
||||
} else {
|
||||
@ -80,10 +81,11 @@
|
||||
file_data.orig_name = file_data.name;
|
||||
file_data.name = response.files[i];
|
||||
file_data.is_file = true;
|
||||
file_data.blob = undefined;
|
||||
}
|
||||
}
|
||||
);
|
||||
_value = normalise_file(value, root, root_url);
|
||||
old_value = _value = normalise_file(value, root, root_url);
|
||||
}
|
||||
dispatch("change");
|
||||
dispatch("upload");
|
||||
|
@ -32,6 +32,7 @@
|
||||
(Array.isArray(detail) ? detail : [detail]).forEach(
|
||||
async (file_data, i) => {
|
||||
file_data.data = await blobToBase64(file_data.blob!);
|
||||
file_data.blob = undefined;
|
||||
}
|
||||
);
|
||||
} else {
|
||||
@ -40,6 +41,7 @@
|
||||
file_data.orig_name = file_data.name;
|
||||
file_data.name = response.files[i];
|
||||
file_data.is_file = true;
|
||||
file_data.blob = undefined;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user