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

Possible to create a Request Body or Multipart Requests? #1

Closed
kartzke opened this issue Aug 2, 2022 · 1 comment
Closed

Possible to create a Request Body or Multipart Requests? #1

kartzke opened this issue Aug 2, 2022 · 1 comment

Comments

@kartzke
Copy link

kartzke commented Aug 2, 2022

Hey, awesome project! Is it possible to send data as a request body, instead of all inputs being used as query params?

I have a scenario where I'm using a textarea input, which could have tens of thousands of words of free text. And in the future, I'd like my form to support file uploads. Possible to do Multipart requests?

Cheers
Ryan

@inxilpro
Copy link
Contributor

inxilpro commented Aug 3, 2022

Yeah, you can do whatever you want with the form. alpine-wizard is really just there for presentation—you can write whatever logic you want. Just add the enctype attribute to the form and you're off.

I'm not 100% sure how Alpine handles file inputs. You may not be able to use x-model for them, in which case you'll need to wire things up by listening with @change. Depending on how big this textarea is, you may want to do something similar for it so that you're not holding 10,000's of words in JS memory needlessly. That will be up to you, though.

@inxilpro inxilpro closed this as completed Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants