finish upyun upload issue

This commit is contained in:
moicen
2022-01-28 02:48:31 +08:00
parent 6f02e88c37
commit 2dbd3a9000
3 changed files with 6 additions and 14 deletions
+2 -2
View File
@@ -97,7 +97,7 @@ end
local function upload(filepath)
local upyun, err = Upyun:new({
user = ngx.var.upyun_operator,
password = ngx.var.upyun_password,
passwd = ngx.var.upyun_password,
localFilePath = filepath
})
@@ -116,7 +116,7 @@ local function upload(filepath)
local info, err = upyun:upload_file(savePath, nil, nil)
if not info then
ngx.status = 502
ngx.log(ngx.ERR, "failed to upload image file : " .. err)
ngx.log(ngx.ERR, "failed to upload file : " .. err)
return
else
ngx.status = 200