Files
resty_functions/prod/upload/README.md
T
2021-08-28 22:01:00 +08:00

492 B

put upload.lua into:

/usr/local/opt/openresty/nginx/resty_funcs

post file:

$ curl --location --request POST 'localhost/upload' \
--form '=@"/Users/weli/works/task_server/src/test/resources/file_example_JPG_100kB.jpeg"'

nginx config

/usr/local/etc/openresty/nginx.conf
location /upload {
   content_by_lua_file /usr/local/opt/openresty/nginx/resty_funcs/upload.lua;
}

enable log:

error_log  /usr/local/etc/openresty/logs/error.log;