fix: upload file path

This commit is contained in:
henry.chen
2025-10-14 10:02:36 +08:00
parent 422aacdc09
commit 523ee64931

View File

@@ -42,7 +42,7 @@ type UploadParams struct {
func (cli *QiniuClient) Upload(params UploadParams) (string, error) { func (cli *QiniuClient) Upload(params UploadParams) (string, error) {
key := params.Name key := params.Name
if !params.NoCompletePath { if !params.NoCompletePath {
key = filepath.Base(params.Name) key = completeQiniuKey(params.Name)
} }
mac := qbox.NewMac(cli.Conf.AccessKey, mac := qbox.NewMac(cli.Conf.AccessKey,