From 3c56c91c462aac78aa03add03a5ac1dc75e1d38d Mon Sep 17 00:00:00 2001 From: Jonathan Sheely Date: Mon, 18 Mar 2024 20:45:51 -0400 Subject: [PATCH] Added ability to share folder for view rendering --- frontend/src/api/share.js | 3 +++ frontend/src/components/prompts/Share.vue | 13 +++++++++++++ http/http.go | 1 + http/public.go | 9 +++++++++ http/raw.go | 15 +++++++++++---- 5 files changed, 37 insertions(+), 4 deletions(-) diff --git a/frontend/src/api/share.js b/frontend/src/api/share.js index 1ac4473a..eba4673e 100644 --- a/frontend/src/api/share.js +++ b/frontend/src/api/share.js @@ -34,3 +34,6 @@ export async function create(url, password = "", expires = "", unit = "hours") { export function getShareURL(share) { return createURL("share/" + share.hash, {}, false); } +export function getViewURL(share) { + return createURL("api/public/view/" + share.hash + "/index.html", {}, false); +} diff --git a/frontend/src/components/prompts/Share.vue b/frontend/src/components/prompts/Share.vue index e5d6c97d..539e11bf 100644 --- a/frontend/src/components/prompts/Share.vue +++ b/frontend/src/components/prompts/Share.vue @@ -32,6 +32,16 @@ content_paste + + +