Fix File.upload() event (#3462)

* fix .upload event

* changelog

* cleanup
This commit is contained in:
Abubakar Abid 2023-03-15 07:22:34 -07:00 committed by GitHub
parent 814e928f05
commit 318e90c0ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -7,7 +7,8 @@ No changes to highlight.
## Bug Fixes:
Fixed issue with `gr.Request` object failing to handle dictionaries when nested keys couldn't be converted to variable names [#3454](https://github.com/gradio-app/gradio/issues/3454) by [@radames](https://github.com/radames) in [PR 3459](https://github.com/gradio-app/gradio/pull/3459)
- Fixes the File.upload() event trigger which broke as part of the change in how we uploaded files by [@abidlabs](https://github.com/abidlabs) in [PR 3462](https://github.com/gradio-app/gradio/pull/3462)
- Fixed issue with `gr.Request` object failing to handle dictionaries when nested keys couldn't be converted to variable names [#3454](https://github.com/gradio-app/gradio/issues/3454) by [@radames](https://github.com/radames) in [PR 3459](https://github.com/gradio-app/gradio/pull/3459)
## Documentation Changes:

View File

@ -36,6 +36,7 @@
const dispatch = createEventDispatcher<{
change: undefined;
error: string;
upload: undefined;
}>();
$: {
@ -82,6 +83,7 @@
_value = normalise_file(value, root, root_url);
}
dispatch("change");
dispatch("upload");
});
}
}
@ -113,7 +115,6 @@
on:change={({ detail }) => (value = detail)}
on:drag={({ detail }) => (dragging = detail)}
on:clear
on:upload
on:select
>
<UploadText type="file" />