任务一完成

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
@@ -51,8 +51,8 @@ func (c *CloudflareR2) getClient(ctx context.Context) (*s3.Client, error) {
return client, nil
}
// Upload 上传文件
func (c *CloudflareR2) Upload(file *multipart.FileHeader) (string, string, error) {
// UploadFile 上传文件
func (c *CloudflareR2) UploadFile(file *multipart.FileHeader) (string, string, error) {
ctx := context.Background()
client, err := c.getClient(ctx)
if err != nil {
@@ -88,8 +88,8 @@ func (c *CloudflareR2) Upload(file *multipart.FileHeader) (string, string, error
return accessURL, key, nil
}
// Delete 删除文件
func (c *CloudflareR2) Delete(key string) error {
// DeleteFile 删除文件
func (c *CloudflareR2) DeleteFile(key string) error {
ctx := context.Background()
client, err := c.getClient(ctx)
if err != nil {