add log
This commit is contained in:
@@ -411,6 +411,7 @@ local function _parse_upyun_option(option, extra, content)
|
|||||||
|
|
||||||
if omd5 == "true" then
|
if omd5 == "true" then
|
||||||
extra["Content-MD5"] = md5(content)
|
extra["Content-MD5"] = md5(content)
|
||||||
|
ngx.log(ngx.INFO, "Content-MD5" .. extra["Content-MD5"])
|
||||||
end
|
end
|
||||||
|
|
||||||
if type(secret) == "string" then
|
if type(secret) == "string" then
|
||||||
|
|||||||
@@ -44,8 +44,8 @@ function upyun_upload.upload(filepath, filename, retry)
|
|||||||
|
|
||||||
local info, err = upyun:upload_file(savePath, nil, options)
|
local info, err = upyun:upload_file(savePath, nil, options)
|
||||||
if not info then
|
if not info then
|
||||||
|
|
||||||
local error_table = json.decode(err)
|
local error_table = json.decode(err)
|
||||||
|
ngx.log(ngx.INFO, "Upyun Upload File Error: " .. err)
|
||||||
ngx.log(ngx.ERR, '[' .. error_table["code"] .. ']')
|
ngx.log(ngx.ERR, '[' .. error_table["code"] .. ']')
|
||||||
|
|
||||||
if (error_table["code"] == 40000006)
|
if (error_table["code"] == 40000006)
|
||||||
@@ -57,7 +57,6 @@ function upyun_upload.upload(filepath, filename, retry)
|
|||||||
ngx.status = 400
|
ngx.status = 400
|
||||||
ngx.log(ngx.ERR, "failed to upload file : " .. '[' .. err .. ']')
|
ngx.log(ngx.ERR, "failed to upload file : " .. '[' .. err .. ']')
|
||||||
end
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
ngx.status = 200
|
ngx.status = 200
|
||||||
local fullpath = ngx.var.upyun_domain .. "/" .. directory .. "/" .. filename
|
local fullpath = ngx.var.upyun_domain .. "/" .. directory .. "/" .. filename
|
||||||
|
|||||||
Reference in New Issue
Block a user