Skip to content

Commit

Permalink
change sendfile to sendFile for Express 4
Browse files Browse the repository at this point in the history
  • Loading branch information
kcivey committed Dec 19, 2014
1 parent cb9a43f commit 5a8da9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ app.get(/^(\/.+)\.([^.\/]+)(\.jpe?g)$/i, function (req, res) {
else {
sendOptions.maxAge = config.maxAge;
}
// sendfile() wants maxAge in milliseconds, not seconds:
// sendFile() wants maxAge in milliseconds, not seconds:
sendOptions.maxAge *= 1000;
if (remoteRes.headers['last-modified']) {
sendOptions.headers['Last-Modified'] = remoteRes.headers['last-modified'];
Expand Down Expand Up @@ -82,7 +82,7 @@ app.get(/^(\/.+)\.([^.\/]+)(\.jpe?g)$/i, function (req, res) {
}
times.converted = Date.now();
console.log('sending converted file with options', sendOptions);
res.sendfile(convertedFile, sendOptions, function () {
res.sendFile(convertedFile, sendOptions, function () {
var prevTime;
times.sent = Date.now();
_.each(times, function (t, name) {
Expand Down

0 comments on commit 5a8da9c

Please sign in to comment.