任务一完成

This commit is contained in:
Yvan
2026-01-07 10:17:10 +08:00
parent 35ab7c0b70
commit 77887aa76b
9 changed files with 34 additions and 34 deletions
+4 -4
View File
@@ -31,8 +31,8 @@ func (h *HuaweiObs) getClient() (*obs.ObsClient, error) {
return obs.New(h.AccessKey, h.SecretKey, h.Endpoint)
}
// Upload 上传文件
func (h *HuaweiObs) Upload(file *multipart.FileHeader) (string, string, error) {
// UploadFile 上传文件
func (h *HuaweiObs) UploadFile(file *multipart.FileHeader) (string, string, error) {
client, err := h.getClient()
if err != nil {
return "", "", err
@@ -66,8 +66,8 @@ func (h *HuaweiObs) Upload(file *multipart.FileHeader) (string, string, error) {
return accessURL, key, nil
}
// Delete 删除文件
func (h *HuaweiObs) Delete(key string) error {
// DeleteFile 删除文件
func (h *HuaweiObs) DeleteFile(key string) error {
client, err := h.getClient()
if err != nil {
return err