fix: correct public URL formatting in GetPublicURL function

This commit is contained in:
Ardeman 2025-04-23 13:50:41 +08:00
parent abc3ce8d2b
commit 714b1ff4eb

View File

@ -66,7 +66,7 @@ func (r *OssRepositoryImpl) GetPublicURL(fileName string) string {
if fileName == "" { if fileName == "" {
return "" return ""
} }
return fmt.Sprintf("%s:%s%s", r.cfg.GetPublicURL(), r.cfg.GetBucketName(), fileName) return fmt.Sprintf("%s/%s%s", r.cfg.GetPublicURL(), r.cfg.GetBucketName(), fileName)
} }
func (r *OssRepositoryImpl) DeleteObject(ctx context.Context, fileName string) error { func (r *OssRepositoryImpl) DeleteObject(ctx context.Context, fileName string) error {