Skip to content

Commit

Permalink
fix: append / to the end of apiPath because if it hasn't, internal ur…
Browse files Browse the repository at this point in the history
…l check for mp4 links fails.
  • Loading branch information
sabrina-bongiovanni committed Oct 24, 2024
1 parent 23e06c4 commit 4464391
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

### Fix

- ...
- Risolto problema con i video esterni che puntano a degli mp4: ora non vengono più erroneamente visti come link interni.

## Versione 11.24.0 (03/10/2024)

Expand Down
10 changes: 6 additions & 4 deletions src/customizations/volto/components/manage/Blocks/Video/Body.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ const Body = ({ data, isEditMode }) => {
ref: ref,
};

let apiPath = config.settings.apiPath;
if (!apiPath.endsWith('/')) {
apiPath += '/';
}

return (
<>
{data.url && (
Expand Down Expand Up @@ -105,10 +110,7 @@ const Body = ({ data, isEditMode }) => {
<video
src={
isInternalURL(
data.url.replace(
getParentUrl(config.settings.apiPath),
'',
),
data.url.replace(getParentUrl(apiPath), ''),
)
? `${data.url}${
data.url.indexOf('@@download/file') < 0
Expand Down

0 comments on commit 4464391

Please sign in to comment.