cancel
Showing results for 
Search instead for 
Did you mean: 

SAPUI5 UploadCollection unable to download

former_member589778
Participant
0 Kudos

Hi Experts,

I am using Uploadcollection to upload and display attachments,

when i click on attachments file name , download not happening and getting an error in console. because of this error i am not able to see the attached documents. please provide some inputs , i am attaching Error details and code.

Error Details:

My XML code for Upload collection

<UploadCollection id="UploadCollection" maximumFileSize="5" instantUpload="true" mode="SingleSelectMaster" multiple="true" uploadButtonInvisible="false" sameFilenameAllowed="true" change="onUploadChange" fileDeleted="onFileDeleted" typeMissmatch="onTypeMissmatch" uploadComplete="onUploadComplete" beforeUploadStarts="onBeforeUploadStarts" > </UploadCollection>

controller code to uploadcollectionitem at runtime to display the attachments,

Note: reading the size from odata service out put

for(var i=0; i<size; i++){

var item = new sap.m.UploadCollectionItem({

documentId : data.results[i].InstidB,

fileName : data.results[i].FileName + "." + data.results[i].Extension,

url: "/sap/opu/odata/sap/ZMDM_CLIENT_MASTER2_SRV/Get_Attachments_Inst_TypeSet('" + data.results[i].InstidB + "')/$value", visibleDelete : true,

visibleEdit : false

});

oUploadCollection.addItem(item);

}

View Entire Topic

Hi Srinivasu,

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 files can be downloaded and the same error was not reproducible.

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