react-native-background-upload
react-native-background-upload copied to clipboard
The upload seems to automatically restart for big files after reaching 100% once
When i'm uploading files with a size around 300 MB or grater. The upload reaches 100% and file is successfully posted to API, But instead of showing upload is complete the plugin starts the upload again from 0%. And after 3 attempts it shows upload failed error. And the file is save 3 times also.
This is due to setMaxRetries(2)
- so initial try + 2 retries.
@StevePotter @TSMMark is a fix for #124 in the pipeline?
@sraka1 Nothing yet, feel free to take a stab
@sraka1 I guess I don't understand why setMaxRetries(2)
is the problem. Seems like the real problem is that the file is failing for whatever reason to complete an upload. setMaxRetries(0)
would result in only one file, but the uploader still wouldn't complete properly. @paulwilson123 it would be great to know the response code returned from the server. Is there a way you can supply that?
could this be related to a low upload socket timeout?
hello i found solution might help you in node node modules react-native-background-upload/android/src/main/java/.../RnUploader/UploaderMoudule increase connectTimeout var to whatever you want i did that and now timeout error is gone
hello, i am having this problem as well, when upload reached 100% it then start uploading file again
edit: effectively as @misag777 says, there is a timeout, in my case, my endpoint that recieve the upload file internally does another call to a mail provider, this comunication is not fast and then a timeout occurs