mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
Merge pull request #627 from peteyus/issue/626/add-headers-on-file-upload
add API headers on upload call
This commit is contained in:
commit
1c5a90226e
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user