mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
net.http: fix multipart/form-data file upload handling
This commit is contained in:
@@ -1,6 +1,15 @@
|
||||
<h2>File Upload</h2>
|
||||
|
||||
File form:
|
||||
<form method="POST" enctype="multipart/form-data" action="/upload">
|
||||
<input type="file" name="upfile" multiple>
|
||||
<input type="submit" value="Press">
|
||||
<input type="hidden" name="file_id" value="aafueB5Quie" />
|
||||
<input type="file" name="upfile" multiple/>
|
||||
<input type="submit" value="Upload"/>
|
||||
</form>
|
||||
|
||||
Text form:
|
||||
<form method="POST" enctype="multipart/form-data" action="/submit">
|
||||
<input type="text" name="content1" value="abc" />
|
||||
<input type="text" name="content2" value="xyz" />
|
||||
<input type="submit" value="Submit content">
|
||||
</form>
|
||||
|
@@ -5,6 +5,7 @@ File amount: @fdata.len
|
||||
@for i, data in fdata
|
||||
|
||||
<h2>Filename: @data.filename</h2>
|
||||
<h2>Length: @data.data.len</h2>
|
||||
<h2>Type: @data.content_type</h2>
|
||||
|
||||
<p>@{files[i]}</p>
|
||||
|
Reference in New Issue
Block a user