Use FileList.files instead of DOM to get all images

Because of infinite scrolling, not all file entries are in the DOM.

This fix uses the FileList.files array instead.

:no_entry_sign: do not merge before https://github.com/owncloud/core/pull/7167 is merged in core.