Add Content-Type header to response

Support auto-detection of MIME types based on filename extension

Signed-off-by: Joe Ma <rikkaneko23@gmail.com>
This commit is contained in:
Joe Ma 2022-06-03 01:49:19 +08:00
parent c9e3376d21
commit 1ec2a9f7f0
No known key found for this signature in database
GPG key ID: 7A0ECF5F5EDC587F
4 changed files with 47 additions and 31 deletions

View file

@ -28,7 +28,7 @@
<h4>Upload file</h4>
<form action="https://paste.nekoul.com" method="POST" enctype=multipart/form-data>
<div>
<input id="upload_file" type="file" name="upload-content">
<input id="upload_file" type="file" name="u">
<div><input type="submit" value="Send"> (<span id="file_size">0 byte</span>)</div>
</div>
</form>
@ -50,7 +50,7 @@
<form action="https://paste.nekoul.com" method="POST" enctype=multipart/form-data>
<div>
<textarea id="text_input" style="width: 30%; max-width: 100%; " rows ="5" cols="50"
name="upload-content" placeholder="Paste your text here..."></textarea>
name="u" placeholder="Paste your text here..."></textarea>
<div><input type="submit" value="Send"></div>
</div>
</form>