Skip to content

[2.0.0-alpha2] Form submission issue with multipart/form-data. #2317

@heikkilamarko

Description

@heikkilamarko

I have the following form in my app, which includes text and file inputs:

<form
	id="task-new-form"
	enctype="multipart/form-data"
	autocomplete="off"
	hx-post="/ui/tasks"
	hx-target="#tasks-table"
	hx-swap="innerHTML"
>...</form>

This code worked flawlessly with htmx version 2.0.0-alpha1. However, after updating to htmx version 2.0.0-alpha2, the form submission stopped working. I suspect this issue is related to changes in how multipart/form-data is handled in htmx:

Screenshot 2024-02-14 at 21 08 55

Metadata

Metadata

Assignees

No one assigned

    Labels

    2.0bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions