From acb0721a35b7fdc8f88de14764d9ff4c3d87599c Mon Sep 17 00:00:00 2001 From: Paul Robert Lloyd Date: Sat, 13 Apr 2024 00:28:23 +0100 Subject: [PATCH] feat(endpoint-files): add back link to file upload page --- packages/endpoint-files/lib/controllers/form.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/endpoint-files/lib/controllers/form.js b/packages/endpoint-files/lib/controllers/form.js index 7279255d6..b485a00dc 100644 --- a/packages/endpoint-files/lib/controllers/form.js +++ b/packages/endpoint-files/lib/controllers/form.js @@ -1,3 +1,4 @@ +import path from "node:path"; import { validationResult } from "express-validator"; import { endpoint } from "../endpoint.js"; @@ -11,6 +12,9 @@ export const formController = { if (scope.includes("create") || scope.includes("media")) { return response.render("file-form", { + back: { + href: path.dirname(request.baseUrl + request.path), + }, title: response.locals.__("files.upload.title"), }); }