This commit is contained in:
2023-07-23 23:21:32 +08:00
parent 95878ab1d3
commit 1446f0c75f
2 changed files with 2 additions and 2 deletions
+1
View File
@@ -411,6 +411,7 @@ local function _parse_upyun_option(option, extra, content)
if omd5 == "true" then
extra["Content-MD5"] = md5(content)
ngx.log(ngx.INFO, "Content-MD5" .. extra["Content-MD5"])
end
if type(secret) == "string" then
+1 -2
View File
@@ -44,8 +44,8 @@ function upyun_upload.upload(filepath, filename, retry)
local info, err = upyun:upload_file(savePath, nil, options)
if not info then
local error_table = json.decode(err)
ngx.log(ngx.INFO, "Upyun Upload File Error: " .. err)
ngx.log(ngx.ERR, '[' .. error_table["code"] .. ']')
if (error_table["code"] == 40000006)
@@ -57,7 +57,6 @@ function upyun_upload.upload(filepath, filename, retry)
ngx.status = 400
ngx.log(ngx.ERR, "failed to upload file : " .. '[' .. err .. ']')
end
else
ngx.status = 200
local fullpath = ngx.var.upyun_domain .. "/" .. directory .. "/" .. filename