We use chunk upload of files to send large files asynchronously with multiple requests.
I want to add custom field to each request (for example File ID) using e.data property.
This custom field has one-to-one relation (file ID <-> file).
I found out property -> e.files is Array (A list of the files that will be uploaded).
It means that upload event be triggered for multiple files.
I can`t understand cases when this field may contain more than one record (for async mode, using chunks).
On the server side -> request contains such info as chunkIndex, fileName, totalFileSize....
It means: one request for one file.
My questions are:
1. When do the upload event may have files property with more than one record?
2. Сan I rely on the fact that "files.length = 1" for async mode using chunks.
3. Is there are any other options to add my custom field (belongs to file) to request?
I really hope for your help, thanks.