Skip to content
Snippets Groups Projects
Commit 8daea3b8 authored by B. Sc Pius Gyamenah's avatar B. Sc Pius Gyamenah :speech_balloon: Committed by Elmar Ludwig
Browse files

Biest #1259

Closes #1259 and #1058

Merge request studip/studip!1053
parent 7c472c47
No related branches found
No related tags found
No related merge requests found
......@@ -290,13 +290,12 @@ export const actions = {
},
async createFile(context, { file, filedata, folder }) {
const termId = file.relationships['terms-of-use'].data.id;
const termId = file?.relationships['terms-of-use']?.data?.id ?? null;
const formData = new FormData();
formData.append('file', filedata, file.attributes.name);
if (termId) {
formData.append('term-id', termId);
}
const url = `folders/${folder.id}/file-refs`;
let request = await state.httpClient.post(url, formData, {
headers: {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment