@gradio/upload 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @gradio/upload
2
2
 
3
+ ## 0.3.2
4
+
5
+ ### Fixes
6
+
7
+ - [#6234](https://github.com/gradio-app/gradio/pull/6234) [`aaa55ce85`](https://github.com/gradio-app/gradio/commit/aaa55ce85e12f95aba9299445e9c5e59824da18e) - Video/Audio fixes. Thanks [@freddyaboulton](https://github.com/freddyaboulton)!
8
+
3
9
  ## 0.3.1
4
10
 
5
11
  ### Patch Changes
@@ -155,4 +161,4 @@ From the backend, streamed outputs are served from the `/stream/` endpoint inste
155
161
  ### Patch Changes
156
162
 
157
163
  - Updated dependencies []:
158
- - @gradio/atoms@0.0.2
164
+ - @gradio/atoms@0.0.2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradio/upload",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Gradio UI packages",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
@@ -10,7 +10,7 @@
10
10
  "@gradio/atoms": "^0.2.0",
11
11
  "@gradio/icons": "^0.2.0",
12
12
  "@gradio/client": "^0.7.1",
13
- "@gradio/upload": "^0.3.1",
13
+ "@gradio/upload": "^0.3.2",
14
14
  "@gradio/utils": "^0.2.0"
15
15
  },
16
16
  "main_changeset": true,
package/src/Upload.svelte CHANGED
@@ -46,9 +46,7 @@
46
46
  if (!files.length) {
47
47
  return;
48
48
  }
49
-
50
49
  let _files: File[] = files.map((f) => new File([f], f.name));
51
-
52
50
  let file_data = await prepare_files(_files);
53
51
  return await handle_upload(file_data);
54
52
  }
@@ -80,7 +78,7 @@
80
78
  if (!e.dataTransfer?.files) return;
81
79
 
82
80
  const files_to_load = Array.from(e.dataTransfer.files).filter((f) => {
83
- if (is_valid_mimetype(filetype, f.type)) {
81
+ if (filetype?.split(",").some((m) => is_valid_mimetype(m, f.type))) {
84
82
  return true;
85
83
  }
86
84
  dispatch("error", `Invalid file type only ${filetype} allowed.`);