nginx uploads files without using background code
淡淡烟草味
淡淡烟草味 2017-05-16 17:29:46
0
2
664

Just transfer the file to the specified directory without using PHP Python and other background processing

<html>
<head>
<title>Test upload</title>
</head>
<body>
<h2>Select files to upload</h2>
<form name="upload" method="POST" enctype="multipart/form-data" action="/upload">
<input type="file" name="file1"><br>
<input type="file" name="file2"><br>
<input type="file" name="file3"><br>
<input type="file" name="file4"><br>
<input type="file" name="file5"><br>
<input type="file" name="file6"><br>
<input type="submit" name="submit" value="Upload">
<input type="hidden" name="test" value="value">
</form>
</body>
</html>

Just use this to upload a simple page, and then nginx can directly specify a path to save it without any background processing.

淡淡烟草味
淡淡烟草味

reply all(2)
小葫芦

nginx itself should not support it, and nginx does not natively support cgi, so it seems that you either have to write an nginx plug-in to do this, or you should use fastcgi. Here is a simple guide to configure nginx to "support cgi": http://wiki.nginx.org/SimpleCGI

Ty80

I don’t think so, because you have to complete the file stream transmission. How do you implement this as a single HTML?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template