I have been trying simple image upload using lua and Openresty web framework. I found many solutions like
Using lua-resty-post I got the form data now how do I upload it?
local resty_post = require 'resty.post'
local cjson = require 'cjson'
local post = resty_post:new()
local m = post:read()
ngx.say(cjson.encode(m))
As I'm new to lua I don't understand which one to use. My requirement is very simple, I need a file attribute and want to upload on some place like in php move_uploaded_file. Is there any simple way to upload a file?
Found the solution. Using lua-resty-post.
upload.html
nginx.conf
image.lua