Skip to content

Commit

Permalink
MediaTypePlugin.fileMatcher should take the URI
Browse files Browse the repository at this point in the history
... as opposed to the os-dependent file system path.
  • Loading branch information
jdesrosiers committed Aug 7, 2024
1 parent 9df7fb7 commit 6186d2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/uri-schemes/file-scheme-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const retrieve = async (uri, baseUri) => {
responseUri = pathToFileURL(await readlink(filePath)).toString();
}

const contentType = await getFileMediaType(filePath);
const contentType = await getFileMediaType(responseUri);
const stream = createReadStream(filePath);
const response = new Response(stream, {
headers: { "Content-Type": contentType }
Expand Down

0 comments on commit 6186d2f

Please sign in to comment.