finished metrics
This commit is contained in:
parent
76a6f02eb7
commit
99477774cf
9 changed files with 542 additions and 173 deletions
|
@ -107,12 +107,18 @@ app.get('/download/:id', (req, res) => {
|
|||
storage
|
||||
.length(id)
|
||||
.then(contentLength => {
|
||||
res.render('download', {
|
||||
filename: decodeURIComponent(filename),
|
||||
filesize: bytes(contentLength),
|
||||
trackerId: conf.analytics_id,
|
||||
dsn: conf.sentry_id
|
||||
});
|
||||
storage
|
||||
.ttl(id)
|
||||
.then(timeToExpiry => {
|
||||
res.render('download', {
|
||||
filename: decodeURIComponent(filename),
|
||||
filesize: bytes(contentLength),
|
||||
sizeInBytes: contentLength,
|
||||
timeToExpiry: timeToExpiry,
|
||||
trackerId: conf.analytics_id,
|
||||
dsn: conf.sentry_id
|
||||
});
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
res.render('download');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue