mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-10-02 07:21:05 +00:00
18 lines
482 B
Markdown
18 lines
482 B
Markdown
---
|
|
layout: layout.njk
|
|
title: </> htmx - hx-encoding
|
|
---
|
|
|
|
## `hx-encoding`
|
|
|
|
The `hx-encoding` attribute allows you to switch the request encoding from the usual `application/x-www-form-urlencoded`
|
|
encoding to `multipart/form-data`, usually to support file uploads in an ajax request.
|
|
|
|
The value of this attribute should be `multipart/form-data`.
|
|
|
|
The `hx-encoding` tag may be placed on parent elements.
|
|
|
|
### Notes
|
|
|
|
* `hx-encoding` is inherited and can be placed on a parent element
|