-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
It is possible to have a file input that has multiple files uploaded.
https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/multiple
<form action="/{{ jetzig_view }}" method="POST" enctype="multipart/form-data" id="myform">
<input class="form-control" type="file" name="attachments" multiple>
</form>HTTP POST parameters
------geckoformboundarye011264df08dce9643f770aab11f4ec7
Content-Disposition: form-data; name="attachments"; filename="file_upload_1.txt"
Content-Type: text/plain
foo
------geckoformboundarye011264df08dce9643f770aab11f4ec7
Content-Disposition: form-data; name="attachments"; filename="file_upload_2.txt"
Content-Type: text/plain
bar
------geckoformboundarye011264df08dce9643f770aab11f4ec7--
Currently calling request.file only appears to return the first attachment, and looking briefly through the code there does not appear to be any handling of multiple, although I could be mistaken.
if (try request.file("attachments")) |attachments| {
try request.server.logger.DEBUG("{s}", .{attachments.content});
}DEBUG [2025-03-25T16:14:34] foo
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels