In my React Native app, I have added an functionality to upload multiple images, which will be stored as image[] including uri. This works perfectly for Android.
But fo
I had this exact same issue.
The solution is to set the uri to the 'file' attribute.
This is how you can append the image into formData correctly for both iOS and Android:
let uri = image.file;
// extract the filetype
let fileType = uri.substring(uri.lastIndexOf(".") + 1);
formData.append('uploads[]', {
uri,
name: `photo.${fileType}`,
type: `image/${fileType}`,
});
You can't remove the additional data on the iOS filename "?id=98EBA95A-254E-40F4-8E1D-C355D8795777&ext=JPG'" at this point, otherwise it won't upload. You can remove it at the server side though.