Multiple file uploads in one http request


#1

hi, i’am using cordova file transfer plugin to upload picture to java backend(jetty), i"am able to upload one picture in one http multipart request, but i need to upload multiple file in one request how can i do that with plugin(file transfer), PLZ help me.
thnks


#2

File Transfer doesn’t offer any method to upload multiple files.

In general for file uploads it is a better idea to make them individually on mobile as you want to fail only some, not all uploads, on connection problems.


#3

for exemple i can use a loop to upload multiple file i did that it woks
well but probleme is if a file fail to be uploaded how can I resolve that


#4

You write code that handles failing uploads. For example generate a list of all uploads before you start, remove the ones that were successful. At the end you have the failed ones in the list left.