openresty(nginx+lua)中获取不到post数据,ngx.req.get_body_data返回nil This function returns nil if the request body has not been read, the request body has been read into disk temporary files, or the request body has zero size. 打开nginx调试日志 error_log /var/log/ng
var multiparty = require('multiparty'); var http = require('http'); var util = require('util'); var fs = require("fs"); http.createServer(function(req, res) { if (req.url === '/upload' && req.method === 'POST') { // 解析一个文件上传 var form = n