Skip to Content

sap.m.UploadCollection Change Event Drag & Drop

Jan 09 at 11:35 AM


avatar image
Former Member

Hi Guys,

I am attaching an event listener to the change event of the sap.m.UploadCollection to upload the selected file to a 3rd party repository.

So I bypass the default upload mechanism. This is in fact working.
I am facing a problem with - from my point of view - inconsistent behavior of the change event. When attaching multiple files with the file chooser of the browser the event contains a list of all selected files.

When I drag & drop multiple files on the UploadCollection the change event is triggered for each file. So when dragging 2 files, the event is fired twice.
From my point of view this is not consistent, as the behavior is different when using the file picker dialog.

Unfortunately I have at least to know how many attachments are going to be uploaded.
Any ideas why this happens? As workaround it would already be helpful to deactivate drag & drop - is this possible?


10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
avatar image
Former Member Jan 10 at 01:56 PM

I ended up in overriting the _onDropOnUploadCollection function of the UploadCollection.

In fact, here is the event fired within a for loop.

I am not firing the event once and pass the array of files as param.

10 |10000 characters needed characters left characters exceeded