diff --git a/src/api/settings.js b/src/api/settings.js index b79b602e..77651ec0 100644 --- a/src/api/settings.js +++ b/src/api/settings.js @@ -43,7 +43,7 @@ export async function updateInstanceDocument(name, formData, authHost, token) { return fetch(url, { body: formData, - method: 'patch', + method: 'PATCH', headers: authHeaders(token) }) .then((data) => data.json()) diff --git a/src/store/modules/settings.js b/src/store/modules/settings.js index eaf9bda4..f6ea4873 100644 --- a/src/store/modules/settings.js +++ b/src/store/modules/settings.js @@ -132,7 +132,8 @@ const settings = { }, async UpdateInstanceDocs({ getters }, { name, content }) { const formData = new FormData() - formData.append('file', content) + const blob = new Blob([content], { type: 'text/html' }) + formData.append('file', blob) await updateInstanceDocument(name, formData, getters.authHost, getters.token) }, UpdateSettings({ commit }, { group, key, input, value, type }) {