Skip to Content
0
Aug 18, 2017 at 10:15 AM

UploadCollection is not triggering CREATE_STREAM method

1242 Views Last edit Aug 18, 2017 at 12:13 PM 3 rev

Hello Experts,

I am trying to create an application for uploading the attachments using UI element sap.m.UploadCollection.

Code in XML view:

<UploadCollection id="UploadCollection" maximumFilenameLength="55" maximumFileSize="10" multiple="false" sameFilenameAllowed="false" showSeparators="All" noDataText='No Attachment found' change="onChange"

uploadComplete="onUploadComplete" beforeUploadStarts="onBeforeUploadStarts" uploadUrl="/sap/opu/odata/sap/ZPROJ_DNT_ATTACHMENT_SRV/ZENT_ATTACHMNTSet"> </UploadCollection>

Code in Controller:

Method: onChange

Have set the following values to HeaderParameter:

Content-Type / SLUG / X-CSRF-Token.

After writing above code I assume CREATE_STREAM method in DPC_EXT should be called. Is my understanding correct?

Have gone through many blogs around this but not able to make this UI element working.

As I am new to SAPUI5 so I might have missed some point.

Looking for suggestion on how to solve this.

Regards,

Harish