How to add parameters to UploadSet?
source link: https://answers.sap.com/questions/13459114/how-to-add-parameters-to-uploadset.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
How to add parameters to UploadSet?
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,
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK