Vydia / react-native-background-upload

Upload files in your React Native app even while it's backgrounded. Supports Android and iOS, including camera roll assets.
MIT License
720 stars 325 forks source link

Request timed out #333

Open MilanC994 opened 1 year ago

MilanC994 commented 1 year ago

I'm trying to upload large videos, and getting the error 'Request timed out'. I was able to increase the timeout for Android, but how do I do it for IOS ?

I can see the request is processed on my backend, it uploads the file to s3, and returns correct url, but the RNBU throws the timeout error anyways.

RN: 0.68.2 RNBU: 6.6.0

MilanC994 commented 8 months ago

Anyone help please ?

kusche12 commented 5 months ago

@MilanC994 were you able to find a fix for this? I am noticing some of our user uploads have the same error when trying to run a background upload

MilanC994 commented 5 months ago

@kusche12 Not yet.

MilanC994 commented 4 months ago

Hey @kusche12 I was able to solve this issue by increasing the timeoutInterval for IOS too. go to ode_modules/react-native-background-upload/ios/VydiaRNFileUploader.m and add your custom timeout interval

... NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:requestUrl]; [request setHTTPMethod: method]; [request setTimeoutInterval:YOUR_INTERVAL]; ...