Simplify how files are passed into the JS Client (and make consistent with Python Client) #8082
Labels
gradio_client
Related to the one of the gradio client libraries
refactor
Involves refactoring existing code
svelte
Frontend-related issue (JS)
Milestone
Follow up from #7646:
If you look at the view API page for any endpoint that involves uploading a file, the file dictionary in the payload is very complex, e.g.:
This is technically correct, but it would be nice to wrap this in a helper function so users don't have to think about all of the fields. For the Python Client, we have a file() helper function that just takes in the path to the file and populates the rest of the fields accordingly, maybe we could do the same for the js client.
The text was updated successfully, but these errors were encountered: