From d61928190822dcc8263a80cc75a17c9ab6534f5a Mon Sep 17 00:00:00 2001 From: bill bittner Date: Wed, 29 Nov 2017 21:06:59 -0800 Subject: [PATCH] added progress bar component and fixed publish thumbnail bug --- controllers/serveController.js | 2 +- routes/serve-routes.js | 1 - views/partials/asset.handlebars | 7 +++- views/partials/progressBar.handlebars | 55 +++++++++++++++++++++++++++ 4 files changed, 61 insertions(+), 4 deletions(-) create mode 100644 views/partials/progressBar.handlebars diff --git a/controllers/serveController.js b/controllers/serveController.js index fdbfcd81..450d6ba8 100644 --- a/controllers/serveController.js +++ b/controllers/serveController.js @@ -105,7 +105,7 @@ module.exports = { if (!claim) { throw new Error('no record found in Claim table'); } - claim.dataValues.thumbnail = module.exports.chooseThumbnail(claim.dataValues.thumbnail, DEFAULT_THUMBNAIL); + claim.dataValues.thumbnail = module.exports.chooseThumbnail(claim.dataValues, DEFAULT_THUMBNAIL); claim.dataValues.fileExt = module.exports.determineFileExtensionFromContentType(claim.dataValues.contentType); return claim.dataValues; }); diff --git a/routes/serve-routes.js b/routes/serve-routes.js index fd45f3be..b0383bc5 100644 --- a/routes/serve-routes.js +++ b/routes/serve-routes.js @@ -172,7 +172,6 @@ function determineName (uri) { } function showAssetToClient (claimId, name, res) { - // check for local file info, resolve the claim, and get the short return Promise .all([getClaimRecord(claimId, name), db.Claim.getShortClaimIdFromLongClaimId(claimId, name)]) .then(([claimInfo, shortClaimId]) => { diff --git a/views/partials/asset.handlebars b/views/partials/asset.handlebars index 7cc50511..96f06d0e 100644 --- a/views/partials/asset.handlebars +++ b/views/partials/asset.handlebars @@ -1,6 +1,9 @@
- +