Router.route('/media', {name: 'mediaMenu'});

Router.route('/media/static/:filepath*', function () {
    if (settings.findOne({key: 'mediainternalserver'}).value) {
    //        var mime = Npm.require('mime');
        var fs = Npm.require('fs');

        var filepath = settings.findOne({key: 'mediadir'}).value + '/' + this.params.filepath;

        try {
            var stats = fs.statSync(filepath);
        }
        catch (e) {
            this.next();
            return;
        }
        if (!stats.isFile()) {
            this.next();
            return;
        }

        var headers = {
            'Cache-Control': 'max-age=2592000' // Cache for 30 days.
        };
        
        this.response.writeHead(200, headers);
        var stream = fs.createReadStream(filepath);
        return stream.pipe(this.response);
    }
}, {where: 'server'});

@@ -162,54 +162,8 @@
 ) %7B%0A
-    //        var mime = Npm.require('mime');%0A
     
@@ -594,16 +594,17 @@
 2592000'
+,
  // Cach
@@ -618,16 +618,57 @@
 0 days.%0A
+            'Content-Length': stats.size%0A
         

Set static file Content-Length header