fix
This commit is contained in:
@@ -28,10 +28,7 @@ cp test_scripts/*.lua $openresty_lua_scripts_dir/tests/
|
|||||||
|
|
||||||
# -- Replace scripts path in file
|
# -- Replace scripts path in file
|
||||||
sed -i -e "s|<SCRIPT_PATH>|$openresty_lua_scripts_dir|" \
|
sed -i -e "s|<SCRIPT_PATH>|$openresty_lua_scripts_dir|" \
|
||||||
"$openresty_lua_scripts_dir"/combine.lua \
|
"$openresty_lua_scripts_dir"/*.lua
|
||||||
"$openresty_lua_scripts_dir"/convert_audio.lua \
|
|
||||||
"$openresty_lua_scripts_dir"/test_upyun_upload.lua \
|
|
||||||
"$openresty_lua_scripts_dir"/upyun_upload.lua
|
|
||||||
|
|
||||||
# Reload openresty
|
# Reload openresty
|
||||||
openresty -t
|
openresty -t
|
||||||
|
|||||||
@@ -9,8 +9,7 @@ end
|
|||||||
|
|
||||||
local file_to_check = string.match(ngx.var.request_uri, ".*/(.*)")
|
local file_to_check = string.match(ngx.var.request_uri, ".*/(.*)")
|
||||||
local file_dir = ngx.var.tmp_file_dir
|
local file_dir = ngx.var.tmp_file_dir
|
||||||
|
|
||||||
local fullpath = file_dir .. "/" .. file_to_check .. ".jpeg";
|
local fullpath = file_dir .. "/" .. file_to_check .. ".jpeg";
|
||||||
|
ngx.log(ngx.INFO, "FILE TO CHECK -> ", fullpath)
|
||||||
ngx.say(file_exists(fullpath))
|
ngx.say(file_exists(fullpath))
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ local req_body = cjson.decode(ngx.req.get_body_data())
|
|||||||
ngx.log(ngx.INFO, 'REQ_BODY -> ', ngx.req.get_body_data())
|
ngx.log(ngx.INFO, 'REQ_BODY -> ', ngx.req.get_body_data())
|
||||||
local data = req_body["payload"]["images"]
|
local data = req_body["payload"]["images"]
|
||||||
|
|
||||||
let combined_uuid = uuid.generate_v4()
|
local combined_uuid = uuid.generate_v4()
|
||||||
local combined = file_dir .. "/" .. combined_uuid .. ".jpeg";
|
local combined = file_dir .. "/" .. combined_uuid .. ".jpeg";
|
||||||
|
|
||||||
local len = table.getn(data)
|
local len = table.getn(data)
|
||||||
|
|||||||
@@ -6,4 +6,7 @@ local file_to_upload = string.match(ngx.var.request_uri, ".*/(.*)")
|
|||||||
local file_dir = ngx.var.tmp_file_dir
|
local file_dir = ngx.var.tmp_file_dir
|
||||||
local fullpath = file_dir .. "/" .. file_to_upload .. ".jpeg";
|
local fullpath = file_dir .. "/" .. file_to_upload .. ".jpeg";
|
||||||
|
|
||||||
|
ngx.log(ngx.INFO, 'UPLOAD COMBINED IMAGE -> ', fullpath)
|
||||||
|
|
||||||
|
|
||||||
upyun_upload.upload(fullpath)
|
upyun_upload.upload(fullpath)
|
||||||
Reference in New Issue
Block a user