阿里云oss添加删除接口

This commit is contained in:
lzh
2025-07-16 14:12:11 +08:00
parent c214b6c94a
commit 0c7ec61e65
2 changed files with 28 additions and 0 deletions

View File

@@ -73,3 +73,16 @@ func TestALiYunOSSClient_GetObjectToImage(t *testing.T) {
t.Log(img)
}
}
func TestALiYunOSSClient_DelObject(t *testing.T) {
err := client.NewAliYunOSS()
if err != nil {
t.Error(err)
}
err = client.DelObject("", "test/upload/bizhi2.jpg")
if err != nil {
t.Error(err)
} else {
t.Log("成功")
}
}