Hello,
I'm using PortCmis with AtomPub 1.1 in .Net Core and I'm trying to upload a file to Alfresco. I'm trying to set custom metadata., but I'm getting this error: Type classification is unknown!
Here is my code:
parameters[SessionParameter.User] = "myuser";
parameters[SessionParameter.Password] = "mypassword";
parameters[SessionParameter.AtomPubUrl] = "http://my-address-where-is-alfresco/alfresco/api/-default-/public/cmis/versions/1.1/atom";
parameters[SessionParameter.BindingType] = BindingType.AtomPub;
parameters[SessionParameter.PreemptivAuthentication] = "True";
IDictionary<string, object> properties = new Dictionary<string, object>();
properties[PropertyIds.Name] = fileName;
IList<string> secondaryTypes = new List<string>();
secondaryTypes.Add("custom:classification");
properties[PropertyIds.SecondaryObjectTypeIds] = secondaryTypes;
properties["classification"] = "test classification";
After this I'm creating contentStream in a proper way and using it to create document.
var newDoc = folder.CreateDocument(properties, contentStream, VersioningState.None);
Does anyone has same error "Type classification is unknown!" ???