on 2020 Jul 28 4:39 PM
Hello,
I've been trying to use UploadCollection with multiple: true. Before when it was false everything worked fine but since changing to true it started to give this error. I thought it was in uploadComplete but I commented the code inside and it still gave me this error.
I've checked and when using multiple: true while on the uploadComplete function they use the destroy call from ManagedObject-dbg.js which has the error. But with multiple: false we use the Element destroy() and they don't have this error.
So what should I do?
UploadCollection-dbg.js code:
ManagedObject-dbg.js code:
Request clarification before answering.
handleUploadComplete (oEvent) {
//ommited initializations etc
var fileReader = new FileReader();
fileReader.onload = function(oEvent) {
//put something inside an array
};
fileReader.onloadend = function(oEvent) {
array.unshift({
"documentId": id, // generate Id,
"fileName": nameFile,
"mimeType": fileType,
"thumbnailUrl": "",
"url": "",
"attributes": [
{
"title": "Uploaded By",
"text": personName
},
{
"title": "Uploaded On",
"text": new Date(jQuery.now()).toLocaleDateString()
},
{
"title": "File Size",
"text": fileSize
},
],
"statuses": [
{
"title": "",
"text": "",
"state": "None"
}
],
"markers": [
{}
],
"selected": true
});
}
fileReader.readAsDataURL(file);
}
Hello Reshma,
The problem isn't solved yet. But I noticed something interesting, works perfectly if I have a breaking point. I think the problem is when I'm reading the file... I tried working it out with Promises but it still doesn't work. Nothing works...
Thank you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lucy,
Please let us know if you are still facing this issue. In the samples : https://sapui5.hana.ondemand.com/#/entity/sap.m.UploadCollection/sample/sap.m.sample.UploadCollectio... where multiple is set to true I saw that there were no console errors on uploadComplete.
If it is still reproducible it would be good to have a jsFiddle sample code to see how you have implemented Upload Collection.
Regards,
Reshma
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
29 | |
9 | |
8 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.