fixed Content-Header syntax
This commit is contained in:
parent
64b1b720ae
commit
3047d4d997
1 changed files with 2 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
||||||
function serveFile(fileInfo, res){
|
function serveFile(fileInfo, res){
|
||||||
var options = {
|
var options = {
|
||||||
root: fileInfo.directory,
|
root: fileInfo.directory,
|
||||||
headers: { "contentType": fileInfo.contentType}
|
headers: { "Content-Type": fileInfo.contentType}
|
||||||
};
|
};
|
||||||
switch (fileInfo.contentType){
|
switch (fileInfo.contentType){
|
||||||
case "image/jpeg":
|
case "image/jpeg":
|
||||||
|
@ -18,7 +18,7 @@ function serveFile(fileInfo, res){
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
console.log("sending unknown file type as .jpeg");
|
console.log("sending unknown file type as .jpeg");
|
||||||
options["headers"]["contentType"] = "image/jpeg";
|
options["headers"]["Content-Type"] = "image/jpeg";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
console.log('options', options);
|
console.log('options', options);
|
||||||
|
|
Loading…
Add table
Reference in a new issue