diff --git a/.changeset/stupid-knives-fold.md b/.changeset/stupid-knives-fold.md new file mode 100644 index 0000000000..1ce945407d --- /dev/null +++ b/.changeset/stupid-knives-fold.md @@ -0,0 +1,6 @@ +--- +"@gradio/file": minor +"gradio": minor +--- + +feat:File table style with accessible file name texts diff --git a/js/file/shared/FilePreview.svelte b/js/file/shared/FilePreview.svelte index 1e78139095..47c7428e03 100644 --- a/js/file/shared/FilePreview.svelte +++ b/js/file/shared/FilePreview.svelte @@ -1,6 +1,6 @@
- {#each Array.isArray(value) ? value : [value] as file, i} + {#each normalized_files as file, i} -
- {display_file_name(file)} + + {file.filename_stem} + {file.filename_ext} @@ -40,7 +58,9 @@ target="_blank" download={window.__is_colab__ ? null : file.orig_name} > - {@html display_file_size(file)} ⇣ + {@html file.size != null + ? prettyBytes(file.size) + : "(size unknown)"} ⇣ {:else} {i18n("file.uploading")} @@ -53,26 +73,17 @@