Skip to content

uploading multiple files? #45

Answered by kartikk221
paradis-A asked this question in Q&A
Discussion options

You must be logged in to vote

Hello, as explained in the provided example from the MultipartField documentation, the Request.multipart() method allows you to pass a handler which will get called with each multipart field attached from a multipart form. So If you wanted to upload multiple files, your code would look something like this:

HTML Code Example

<form action="https://example.com/files/upload" method="post" enctype="multipart/form-data">
    <input type="text" name="text1" value="some text value">
    <input type="text" name="text2" value="some text value">
    <input type="file" name="file1">
    <input type="file" name="file2">
    <input type="file" name="file3">
    <button type="submit">Upload</button>
</form

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kartikk221
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants