Changed ctime to mtime. And turned off static routes. They are handled by nginx now.
This commit is contained in:
parent
23861292d1
commit
8b3e93d5e0
6
files.js
6
files.js
@ -5,7 +5,7 @@ const Koa = require("koa");
|
|||||||
const koaPug = require("koa-pug");
|
const koaPug = require("koa-pug");
|
||||||
const koaRouter = require("koa-router");
|
const koaRouter = require("koa-router");
|
||||||
const koaRange = require("koa-range");
|
const koaRange = require("koa-range");
|
||||||
const koaServe = require("koa-static");
|
//const koaServe = require("koa-static");
|
||||||
const FileType = require("file-type");
|
const FileType = require("file-type");
|
||||||
|
|
||||||
const config = require("./config");
|
const config = require("./config");
|
||||||
@ -57,14 +57,14 @@ async function getDirectoryList(dir_path, base_url) {
|
|||||||
dirs.push({
|
dirs.push({
|
||||||
name: dirent.name,
|
name: dirent.name,
|
||||||
link: `${base_url}${encodeURIComponent(dirent.name)}/`,
|
link: `${base_url}${encodeURIComponent(dirent.name)}/`,
|
||||||
datetime: util.datetime(stat.ctime, util.formats.file_date),
|
datetime: util.datetime(stat.mtime, util.formats.file_date),
|
||||||
size: "DIR",
|
size: "DIR",
|
||||||
size_unit: '' });
|
size_unit: '' });
|
||||||
else
|
else
|
||||||
files.push({
|
files.push({
|
||||||
name: dirent.name,
|
name: dirent.name,
|
||||||
link: `${base_url}${encodeURIComponent(dirent.name)}`,
|
link: `${base_url}${encodeURIComponent(dirent.name)}`,
|
||||||
datetime: util.datetime(stat.ctime, util.formats.file_date),
|
datetime: util.datetime(stat.mtime, util.formats.file_date),
|
||||||
size: +s,
|
size: +s,
|
||||||
size_unit: u });
|
size_unit: u });
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user