Hi,
I have a snippet of code to upload a document to a folder, and it works fine when it's that simple.
this.CreateNode = function(nodeId, file) {
var body = {
type: 144,
parent_id: nodeId,
name: file.name
},
formData = new FormData();
formData.append('body', JSON.stringify(body));
formData.append('file', file);
return $http({
method: 'POST',
url: $config.csUrl + '/otcs_162/llisapi.dll/api/v1/nodes/',
data: formData,
headers: {
OTDSTicket: $auth.Ticket()
}
}).catch(function (err) {
alert("Error: " + err.data);
});
}
However, when the folder it is uploaded into has a category set at the folder level, it is set to inherit, and also has required attributes... this fails with a 400 error. Is there a way to set those fields as this document is getting uploaded?
Thanks
Frank