Fix loading files from embedded spaces (#3177)

* Use root

* CHANGELOG
This commit is contained in:
Freddy Boulton 2023-02-14 13:31:43 -05:00 committed by GitHub
parent d3371ec7d3
commit 3d9226a8e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -36,6 +36,7 @@ By [@freddyaboulton](https://github.com/freddyaboulton) in [PR 3157](https://git
## Bug Fixes:
* Fixes `gr.utils.delete_none` to only remove props whose values are `None` from the config by [@abidlabs](https://github.com/abidlabs) in [PR 3188](https://github.com/gradio-app/gradio/pull/3188)
* Fix bug where embedded demos were not loading files properly by [@freddyaboulton](https://github.com/freddyaboulton) in [PR 3177](https://github.com/gradio-app/gradio/pull/3177)
## Documentation Changes:
* Sort components in docs by alphabetic order by [@aliabd](https://github.com/aliabd) in [PR 3152](https://github.com/gradio-app/gradio/pull/3152)

View File

@ -28,7 +28,7 @@ export function normalise_file(
}
} else if (file.is_file) {
if (root_url == null) {
file.data = "file=" + file.name;
file.data = root + "file=" + file.name;
} else {
file.data = "proxy=" + root_url + "file=" + file.name;
}