Skip to content

Commit 6186d2f

Browse files
committed
MediaTypePlugin.fileMatcher should take the URI
... as opposed to the os-dependent file system path.
1 parent 9df7fb7 commit 6186d2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/uri-schemes/file-scheme-plugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const retrieve = async (uri, baseUri) => {
2222
responseUri = pathToFileURL(await readlink(filePath)).toString();
2323
}
2424

25-
const contentType = await getFileMediaType(filePath);
25+
const contentType = await getFileMediaType(responseUri);
2626
const stream = createReadStream(filePath);
2727
const response = new Response(stream, {
2828
headers: { "Content-Type": contentType }

0 commit comments

Comments
 (0)