@gradio/upload 0.18.1 → 0.18.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,17 @@
1
1
  # @gradio/upload
2
2
 
3
+ ## 0.18.2
4
+
5
+ ### Features
6
+
7
+ - [#13601](https://github.com/gradio-app/gradio/pull/13601) [`0ee5cc8`](https://github.com/gradio-app/gradio/commit/0ee5cc80e2915e5a1b074c892490a62f165cd80d) - Preserve browser-visible proxy origins for frontend assets and API requests, and retain app-level FastAPI root paths. Thanks @abidlabs!
8
+
9
+ ### Dependency updates
10
+
11
+ - @gradio/client@2.4.0
12
+ - @gradio/utils@0.14.0
13
+ - @gradio/atoms@0.26.1
14
+
3
15
  ## 0.18.1
4
16
 
5
17
  ### Fixes
@@ -1,6 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { FileData, type Client } from "@gradio/client";
3
3
  import { onMount, onDestroy } from "svelte";
4
+ import { resolve_current_origin_url } from "@gradio/utils";
4
5
 
5
6
  type FileDataWithProgress = FileData & { progress: number };
6
7
 
@@ -46,9 +47,11 @@
46
47
  }
47
48
 
48
49
  onMount(async () => {
49
- stream = await stream_handler(
50
- new URL(`${root}/gradio_api/upload_progress?upload_id=${upload_id}`)
50
+ const upload_progress_url = resolve_current_origin_url(
51
+ root,
52
+ `/gradio_api/upload_progress?upload_id=${upload_id}`
51
53
  );
54
+ stream = await stream_handler(upload_progress_url);
52
55
 
53
56
  if (stream == null) {
54
57
  throw new Error("Event source is not defined");
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@gradio/upload",
3
- "version": "0.18.1",
3
+ "version": "0.18.2",
4
4
  "description": "Gradio UI packages",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
7
7
  "author": "",
8
8
  "license": "ISC",
9
9
  "dependencies": {
10
- "@gradio/atoms": "^0.26.0",
10
+ "@gradio/atoms": "^0.26.1",
11
+ "@gradio/client": "^2.4.0",
11
12
  "@gradio/icons": "^0.16.0",
12
- "@gradio/client": "^2.3.1",
13
- "@gradio/utils": "^0.13.0"
13
+ "@gradio/utils": "^0.14.0"
14
14
  },
15
15
  "main_changeset": true,
16
16
  "exports": {
@@ -1,6 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { FileData, type Client } from "@gradio/client";
3
3
  import { onMount, onDestroy } from "svelte";
4
+ import { resolve_current_origin_url } from "@gradio/utils";
4
5
 
5
6
  type FileDataWithProgress = FileData & { progress: number };
6
7
 
@@ -46,9 +47,11 @@
46
47
  }
47
48
 
48
49
  onMount(async () => {
49
- stream = await stream_handler(
50
- new URL(`${root}/gradio_api/upload_progress?upload_id=${upload_id}`)
50
+ const upload_progress_url = resolve_current_origin_url(
51
+ root,
52
+ `/gradio_api/upload_progress?upload_id=${upload_id}`
51
53
  );
54
+ stream = await stream_handler(upload_progress_url);
52
55
 
53
56
  if (stream == null) {
54
57
  throw new Error("Event source is not defined");