Files
resty_functions/scripts/upload_combined_image.lua
T
2022-03-09 02:06:37 +08:00

12 lines
360 B
Lua

package.path = package.path .. ';<SCRIPT_PATH>/?.lua';
local upyun_upload = require("upyun_upload")
local file_to_upload = string.match(ngx.var.request_uri, ".*/(.*)")
local file_dir = ngx.var.tmp_file_dir
local fullpath = file_dir .. "/" .. file_to_upload .. ".jpeg";
ngx.log(ngx.INFO, 'UPLOAD COMBINED IMAGE -> ', fullpath)
upyun_upload.upload(fullpath)