fix uuid calling
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user