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

Commit

Permalink
fix: properly replace media path with public path
Browse files Browse the repository at this point in the history
  • Loading branch information
KaneFreeman committed Apr 19, 2024
1 parent bc9e4fa commit 4f0771a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/core/src/lib/util/media.util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,8 @@ export function selectMediaFilePublicPath<EF extends BaseField>(

if (mediaPath.startsWith(mediaFolder)) {
return mediaPath.replace(mediaFolder, publicFolder);
} else if (mediaPath.startsWith(trim(mediaFolder, '/'))) {
return mediaPath.replace(trim(mediaFolder, '/'), publicFolder);
}

return mediaPath;
Expand Down

0 comments on commit 4f0771a

Please sign in to comment.