on 08-12-2021 8:46 AM
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
Hello @MioYasutake ,
I am facing the same issue as you, but I think you have the solution so far, but I would like to update my research to help anyone have the same problem :D.
I have solved my issue with the solution below; that's an awesome solution. Hope it will be useful.
https://github.com/SAP/openui5/issues/3381
Best regards,
Huy Nguyen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.