Skip to content
This repository was archived by the owner on Sep 9, 2024. It is now read-only.

Commit 4f0771a

Browse files
committed
fix: properly replace media path with public path
1 parent bc9e4fa commit 4f0771a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/core/src/lib/util/media.util.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,8 @@ export function selectMediaFilePublicPath<EF extends BaseField>(
306306

307307
if (mediaPath.startsWith(mediaFolder)) {
308308
return mediaPath.replace(mediaFolder, publicFolder);
309+
} else if (mediaPath.startsWith(trim(mediaFolder, '/'))) {
310+
return mediaPath.replace(trim(mediaFolder, '/'), publicFolder);
309311
}
310312

311313
return mediaPath;

0 commit comments

Comments
 (0)