Skip to content
Darkmown 2.7

File upload

A urlencoded body can only carry a file's name. A :form that contains a file field now declares enctype="multipart/form-data" and the runtime posts the FormData itself, letting the browser write the multipart boundary. Nothing else about the form changes.

Pick a file and send it

Submit with no file to see the failure path: the endpoint answers 422 with a JSON body, and the page renders the server's own sentence rather than "HTTP 422".

The rules

Read the docs on file upload