[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow multipart/form-data as flows input format #562

Open
pavelgj opened this issue Jul 9, 2024 · 0 comments
Open

Allow multipart/form-data as flows input format #562

pavelgj opened this issue Jul 9, 2024 · 0 comments
Labels
feature New feature or request

Comments

@pavelgj
Copy link
Collaborator
pavelgj commented Jul 9, 2024

Relevant discussion
https://discord.com/channels/1255578482214305893/1260011253330612254

rodydavis
Would it be possible to interop with multi part formdata in addition to json?
Ideally you could just have the form action attribute point to gen kit and you could define the schema for the fields in the form you expect.
This would also allow for standard HTTP requests and work with multiple file data types.
Progressive enhancement could be even returning form validation errors based on the zod schema too

pavelgj
Today flows follow the callable function protocol. However, it could support multiple protocols.... So for example if the request content type is application/json then it's a callable function, but if it's multipart/form-data we can map each field/part to the JSON object...

@pavelgj pavelgj added the feature New feature or request label Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants