From 46afb1f1df4a6d46f4e1511451dbb64761a8e095 Mon Sep 17 00:00:00 2001 From: Peter Jorgensen Date: Mon, 18 Sep 2023 21:56:42 -0600 Subject: [PATCH] add API headers on upload call --- packages/web/src/utility/uploadFiles.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/web/src/utility/uploadFiles.ts b/packages/web/src/utility/uploadFiles.ts index ae669bd8..88d6a8d8 100644 --- a/packages/web/src/utility/uploadFiles.ts +++ b/packages/web/src/utility/uploadFiles.ts @@ -2,7 +2,7 @@ import { extensions } from '../stores'; import { get } from 'svelte/store'; import { canOpenByElectron, openElectronFileCore } from './openElectronFile'; import getElectron from './getElectron'; -import resolveApi from './resolveApi'; +import resolveApi, { resolveApiHeaders } from './resolveApi'; import { findFileFormat } from '../plugins/fileformats'; import { showModal } from '../modals/modalTools'; import ImportExportModal from '../modals/ImportExportModal.svelte'; @@ -46,6 +46,7 @@ export default function uploadFiles(files) { const fetchOptions = { method: 'POST', body: formData, + headers: resolveApiHeaders(), }; const apiBase = resolveApi();