fix: properly replace media path with public path
This commit is contained in:
parent
bc9e4fa422
commit
4f0771a1c2
@ -306,6 +306,8 @@ export function selectMediaFilePublicPath<EF extends BaseField>(
|
|||||||
|
|
||||||
if (mediaPath.startsWith(mediaFolder)) {
|
if (mediaPath.startsWith(mediaFolder)) {
|
||||||
return mediaPath.replace(mediaFolder, publicFolder);
|
return mediaPath.replace(mediaFolder, publicFolder);
|
||||||
|
} else if (mediaPath.startsWith(trim(mediaFolder, '/'))) {
|
||||||
|
return mediaPath.replace(trim(mediaFolder, '/'), publicFolder);
|
||||||
}
|
}
|
||||||
|
|
||||||
return mediaPath;
|
return mediaPath;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user