clean up
This commit is contained in:
@@ -12,8 +12,6 @@ function upyun_upload.upload(filepath, filename)
|
||||
local upyun, err = Upyun:new({
|
||||
user = ngx.var.upyun_operator,
|
||||
passwd = ngx.var.upyun_password,
|
||||
--user = "moicen",
|
||||
--passwd = "NyJ51zRwFApY9Wo9EHJMrb8GI9YtvpVN",
|
||||
localFilePath = filepath
|
||||
})
|
||||
|
||||
@@ -25,8 +23,6 @@ function upyun_upload.upload(filepath, filename)
|
||||
|
||||
local bucket = ngx.var.upyun_bucket
|
||||
local directory = ngx.var.upyun_directory
|
||||
--local bucket = "huiwing"
|
||||
--local directory = "music-room"
|
||||
if not filename then
|
||||
filename = strip_path.strip_path(filepath)
|
||||
end
|
||||
@@ -49,9 +45,7 @@ function upyun_upload.upload(filepath, filename)
|
||||
else
|
||||
ngx.status = 200
|
||||
local fullpath = ngx.var.upyun_domain .. "/" .. directory .. "/" .. filename
|
||||
--local fullpath = "https://upyun.huiwings.cn" .. "/" .. directory .. "/" .. filename
|
||||
ngx.log(ngx.INFO, "SUCCESS UPLOAD -> UPYUN URL -> ", fullpath)
|
||||
--ngx.say("SUCCESS UPLOAD -> UPYUN URL -> ", fullpath)
|
||||
ngx.say(fullpath)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user