restructure

This commit is contained in:
2022-01-16 16:35:23 +08:00
parent 45d0823b1e
commit d699cc13e0
11 changed files with 0 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
local yun = require("upyun")
local function upyun_upload_file()
local config = {
user = "moicen", --授权操作员名称
passwd = "NyJ51zRwFApY9Wo9EHJMrb8GI9YtvpVN", --操作员密码
localFilePath = "/Users/liyong/Code/Lua/resty_functions/test_files_dir/r2d2.jpeg"
}
local upyun = yun:new(config)
local savePath = "huiwing/test/r2d2.jpeg"
local gmkerl = nil
local options = nil
local info, err = upyun:upload_file(savePath, gmkerl, options)
if not info then
ngx.say("failed to upload image file : " .. err)
return
else
ngx.say(info)
end
end
upyun_upload_file()