2021-11-28 16:29:59 +08:00
2021-11-24 20:08:31 +08:00
2021-11-20 03:51:39 +08:00
fix
2021-11-28 16:29:59 +08:00
fix
2021-11-28 15:40:07 +08:00
2021-11-18 20:45:55 +08:00
fix
2021-11-28 16:20:29 +08:00

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;

MacOS

Binary:

➤ which openresty                                                                                                              20:17:35
/usr/local/bin/openresty

Configuration:

pwd                                                                                                                          20:17:57
/usr/local/opt/openresty
pwd                                                                                                                          20:20:00
/usr/local/opt/openresty/nginx/resty_funcs

Update:

weli@ovpn-12-178:/u/l/o/o/n/resty_funcs
➤ pwd                                                                                                                          20:20:38
/usr/local/opt/openresty/nginx/resty_funcs
weli@ovpn-12-178:/u/l/o/o/n/resty_funcs
➤ cp ~/works/resty_functions/* .                                                                                               20:20:40
weli@ovpn-12-178:/u/l/o/o/n/resty_funcs
➤
S
Description
OpenResty configs and Lua scripts
Readme 469 KiB
Languages
Lua 76.4%
Shell 23.6%