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

HX-Boost should respect native enctype attribute if present in a form tag #908

Closed
codepilotsf opened this issue May 12, 2022 · 2 comments
Closed

Comments

@codepilotsf
Copy link

When using hx-boost, a totally native HTML form tag like this should still work correctly:
<form method="post" action="/upload" enctype="multipart/form-data">

It is unexpected (and difficult to debug) behavior when the form refuses to submit multipart as expected because hx-boost converts it to an AJAX request which then requires an hx-encoding attribute rather than enctype.

Proposed solution: HX-Boost currently converts native HTML in anchor tags and form tags to make an AJAX request instead. In addition to attributes such as href, method, action, HX-Boost should also respect enctype.

1cg added a commit that referenced this issue May 13, 2022
respect the `enctype` attribute on form elements when submitting requests
@1cg
Copy link
Contributor

1cg commented May 13, 2022

Fixed, thanks for your help!

@1cg 1cg closed this as completed May 13, 2022
@codepilotsf
Copy link
Author

Wow, thank you for publishing a fix in under an hour!!

strangeRabbit777 added a commit to strangeRabbit777/high-power-tool that referenced this issue Aug 23, 2022
respect the `enctype` attribute on form elements when submitting requests
strangeRabbit777 added a commit to strangeRabbit777/high-power-tool that referenced this issue Aug 25, 2022
respect the `enctype` attribute on form elements when submitting requests
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