Skip to content

Commit 4387cc2

Browse files
doublefacedoubleface
authored andcommitted
feat: Patch rnfs to handle 303 http code on download
1 parent b3826ee commit 4387cc2

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/node_modules/react-native-fs/android/src/main/java/com/rnfs/Downloader.java b/node_modules/react-native-fs/android/src/main/java/com/rnfs/Downloader.java
2+
index 4da698e..3dbe830 100644
3+
--- a/node_modules/react-native-fs/android/src/main/java/com/rnfs/Downloader.java
4+
+++ b/node_modules/react-native-fs/android/src/main/java/com/rnfs/Downloader.java
5+
@@ -67,6 +67,7 @@ public class Downloader extends AsyncTask<DownloadParams, long[], DownloadResult
6+
(
7+
statusCode == HttpURLConnection.HTTP_MOVED_PERM ||
8+
statusCode == HttpURLConnection.HTTP_MOVED_TEMP ||
9+
+ statusCode == HttpURLConnection.HTTP_SEE_OTHER ||
10+
statusCode == 307 ||
11+
statusCode == 308
12+
)

0 commit comments

Comments
 (0)