fix uuid calling

This commit is contained in:
2023-11-06 02:03:54 +08:00
parent 620e535114
commit 0b4cc166e0
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ local function read_form_file()
local val = res[2]
if key == "Content-Type" then
local ext = ngx.re.match(val, [[(\w+)\/(\w+)]], "jo")[2]
file_name = uuid() .. "." .. ext
file_name = uuid.uuid() .. "." .. ext
end
if file_name then
+2 -2
View File
@@ -55,7 +55,7 @@ local function read_form_file()
local val = res[2]
if key == "Content-Type" then
local ext = ngx.re.match(val, [[(\w+)\/(\w+)]], "jo")[2]
file_name = uuid() .. "." .. ext
file_name = uuid.uuid() .. "." .. ext
end
if file_name then
@@ -96,7 +96,7 @@ local function read_form_file()
-- Compress image
local incoming = file_dir .. "/" .. files[i]
output_file[i] = file_dir .. "/" .. uuid() .. ".jpg"
output_file[i] = file_dir .. "/" .. uuid.uuid() .. ".jpg"
ngx.log(ngx.INFO, 'INPUT FILE -> ', incoming)
ngx.log(ngx.INFO, 'OUTPUT FILE -> ', output_file[i])