From 369a09a6df2730bd1a2bf5f098192634bc1ce889 Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Fri, 26 Dec 2025 12:08:29 +0200 Subject: [PATCH] fix upload --- app/javascript/template_builder/upload.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/javascript/template_builder/upload.vue b/app/javascript/template_builder/upload.vue index be801202..5f4faa57 100644 --- a/app/javascript/template_builder/upload.vue +++ b/app/javascript/template_builder/upload.vue @@ -216,6 +216,9 @@ export default { queryParams () { return new URLSearchParams(window.location.search) }, + uploadUrl () { + return `/templates/${this.templateId}/documents` + }, googleDriveOauthPath () { const params = { access_type: 'offline', @@ -279,7 +282,7 @@ export default { async upload ({ path } = {}) { this.isLoading = true - return this.baseFetch(path || `/templates/${this.templateId}/documents`, { + return this.baseFetch(path || this.uploadUrl, { method: 'POST', headers: { Accept: 'application/json' }, body: new FormData(this.$refs.form)