React native upload multiple files (IOS + Android)

152 Views Asked by At

I have a case that we need to handle uploading up to 100 photos (like google photos). We want to store them on our side (AWS s3 / Azure). How to handle that on mobile / backend side? Is there any library that will take care of core vulnerabilities like:

  • background (if user will minimize the app during upload)
  • error handler during the connection

Maybe someone has any idea how to handle that.

Im searching for SAAS / library to RN that will allow us to upload files for example to AWS s3

1

There are 1 best solutions below

3
Dustin Forsyth On

I am currently working on the same thing. The only library I could find that would handle background uploading like you are taking about is expo-file-system. It works pretty good the biggest issue that I have is that it doesn't provide a way to get active tasks if the app's suspended by the OS. It does however on iOS at least retry until it gets a response from the server even if you no longer have scope of the background process. Errors seem to be handled fine as long as the app stays in the background and execution isn't stopped by the OS. This is using the native android and iOS operating systems to send out these calls so the retry logic should be referred to on that native documentation.

Here is the documentation for expo-file-system: https://docs.expo.dev/versions/latest/sdk/filesystem#filesystemcreateuploadtaskurl-fileuri-options-callback

Here is the native iOS documentation: https://developer.apple.com/documentation/foundation/urlsessionconfiguration/1407496-background