You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -61,7 +61,7 @@ startUpload({
61
61
62
62
### `abortUpload`
63
63
64
-
Abort a file upload for a given file.
64
+
Abort a file upload for a given file. The promise from `startUpload` gets rejected and `onError` runs if present.
65
65
66
66
```ts
67
67
// Pass the uri of a file that started uploading
@@ -199,7 +199,7 @@ useFileUpload({ headers });
199
199
200
200
Requests will time out if you background the app. This can be addressed by using [react-native-background-upload](https://github.com/Vydia/react-native-background-upload).
201
201
202
-
The React Native team did a a heavy lift to polyfill and bridge `XMLHttpRequest` to the native side for us. Hopefully some day it is updated to support requests while an app is backgrounded.
202
+
The React Native team did a a heavy lift to polyfill and bridge `XMLHttpRequest` to the native side for us. [There is an open PR in React Native to allow network requests to run in the background for iOS](https://github.com/facebook/react-native/pull/31838). There are plans to have a similar PR for Android as well. `react-native-background-upload`is great but if backgrounding can be supported without any native dependencies it is a win for everyone.
203
203
204
204
### Why send 1 file at a time instead of multiple in a single request?
Copy file name to clipboardExpand all lines: package.json
+1-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "react-native-use-file-upload",
3
-
"version": "0.1.1",
3
+
"version": "0.1.2",
4
4
"description": "A hook for uploading files using multipart form data with React Native. Provides a simple way to track upload progress, abort an upload, and handle timeouts. Written in TypeScript and no dependencies required.",
0 commit comments