diff --git a/core/frontend/web/site.js b/core/frontend/web/site.js index 1d05b0a372..e47b71d2be 100644 --- a/core/frontend/web/site.js +++ b/core/frontend/web/site.js @@ -25,6 +25,7 @@ const labs = require('../../shared/labs'); const STATIC_IMAGE_URL_PREFIX = `/${urlUtils.STATIC_IMAGE_URL_PREFIX}`; const STATIC_MEDIA_URL_PREFIX = `/${constants.STATIC_MEDIA_URL_PREFIX}`; +const STATIC_FILES_URL_PREFIX = `/${constants.STATIC_FILES_URL_PREFIX}`; let router; @@ -117,6 +118,8 @@ module.exports = function setupSiteApp(options = {}) { siteApp.use(STATIC_IMAGE_URL_PREFIX, mw.handleImageSizes, storage.getStorage('images').serve()); // Serve blog media using the storage adapter siteApp.use(STATIC_MEDIA_URL_PREFIX, labs.enabledMiddleware('mediaAPI'), storage.getStorage('media').serve()); + // Serve blog files using the storage adapter + siteApp.use(STATIC_FILES_URL_PREFIX, labs.enabledMiddleware('filesAPI'), storage.getStorage('files').serve()); // Global handling for member session, ensures a member is logged in to the frontend siteApp.use(membersService.middleware.loadMemberSession);