Hi community,
I'm trying to upload files to Document Management Service.
To do so, I need to send some form data together with a file. The screenshot below is the actual form data sent.
With UploadCollection we would do this by the following code.
onAttachmentsChange: function (oEvent) { var oUploadCollection = oEvent.getSource(); oUploadCollection.addParameter(new UploadCollectionParameter({ name: "cmisAction", value: "createDocument" // create file })); oUploadCollection.addParameter(new UploadCollectionParameter({ name: "propertyId[0]", value: "cmis:objectTypeId" })); oUploadCollection.addParameter(new UploadCollectionParameter({ name: "propertyValue[0]", value: "cmis:document" })); oUploadCollection.addParameter(new UploadCollectionParameter({ name: "propertyId[1]", value: "cmis:name" })); oUploadCollection.addParameter(new UploadCollectionParameter({ name: "propertyValue[1]", value: oEvent.getParameter("files")[0].name })); },
Now that UploadCollection is deprecated, I want to implement upload using UploadSet.
However, in UploadSet I cannot find a method equivalent to addParameter() in UploadCollection.
How can I add parameters to UploadSet? Or, should I fall back to UploadCollection for this case?
Best regards,
Mio