fix: add pdf content type support in GetPolicyURL

This commit is contained in:
2026-03-31 19:45:54 +08:00
parent 3e07c29376
commit 86dacb61a6

View File

@@ -95,6 +95,8 @@ func GetPolicyURL(ctx context.Context, path string) (string, error) {
contentType = "image/tiff" contentType = "image/tiff"
case ".svg": case ".svg":
contentType = "image/svg+xml" contentType = "image/svg+xml"
case ".pdf":
contentType = "application/pdf"
default: default:
return "", fmt.Errorf("unsupported file type: %s", ext) return "", fmt.Errorf("unsupported file type: %s", ext)
} }