Hello, I have set up a javascript function to create a file in openKM. I am looking to add a keyword at the time of creation. The following code uploads a file to openKM, but does not apply keywords
Code: Select all
What do I need to add in order to add keywords?const form = new FormData();
form.append('docPath', `/okm:root/${contentObj.name}`);
form.append('content', contentObj, `${contentObj.name}`);
const response = await fetch(`${OPENKM_API}/document/createSimple`, {
method: 'POST',
headers: {
'Accept': 'application/json',
'Authorization': 'Basic ' + btoa('username:password')
},
body: form
})
.then((res) => {
return res.json();
});