Skip to content

Commit

Permalink
Add a file extension to download url
Browse files Browse the repository at this point in the history
  • Loading branch information
mjh1 committed Sep 18, 2024
1 parent 0d13250 commit 7be5380
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/api/src/controllers/asset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,12 @@ function getDownloadUrl(
os.id !== vodObjectStoreId ? os.publicUrl : pathJoin(ingest, "asset");
const source = asset.files?.find((f) => f.type === "source_file");
if (source) {
return pathJoin(base, asset.playbackId, source.path);
return pathJoin(
base,
asset.playbackId,
source.path,
"download." + asset.videoSpec.format,
);
}
return pathJoin(base, asset.playbackId, "video");
}
Expand Down

0 comments on commit 7be5380

Please sign in to comment.