删除cos内的文件 (cos.delete_object)

声明

腾讯返回结果 = cos.delete_object(存储桶名字, 腾讯云对象存储路径)

参数及返回值

  • 存储桶名字

    • 字符型,腾讯云的存储桶名字,根据腾讯云要求,存储桶名称由:名字-开发商APPID 组成
  • 腾讯云对象存储路径

    • 字符型,腾讯云对象存储路径
  • 腾讯返回结果

    • 文本型,腾讯云的返回结果,一般是json格式的字符串,可以通过json.json2lua进行解析。

示例

--注意secret_id和secret_key请替换为你自己的。
cos.config({secret_id = '*****', secret_key = '*****', region = 'ap-shanghai', scheme = 'https'})

--删除/pic/abc.jpg
print(cos.delete_object('test9999-1222189900', '/pic/abc.jpg'))
powered by GitbookFile Modify: 2021-03-27 23:14:19

results matching ""

    No results matching ""