`onFileDownload` is called with the URL that you can use to download the file. When RNCWebView detects that the HTTP response should result in a file download, `onFileDownload` is called. The client can then provide code to download the file. RNCWebView determines that a file download should take place if either of the following is true: 1. The HTTP response contains a `Content-Disposition` header that is of type 'attachment' 2. The MIME type of the response cannot be rendered by the iOS WebView
|
||
230 | 230 |
|
231 | 231 |
|
232 | 232 |
|
233 |
|
|
233 |
|
|
234 |
|
|
235 |
|
|
236 |
|
|
237 |
|
|
238 |
|
|
239 |
|
|
240 |
|
|
241 |
|
|
242 |
|
|
243 |
|
|
234 | 244 |
|
235 |
|
|
245 |
|
|
236 | 246 |
|
237 | 247 |
|
238 | 248 |
|
|
||
241 | 251 |
|
242 | 252 |
|
243 | 253 |
|
244 |
|
|
254 |
|
|
255 |
|
|
245 | 256 |
|
246 | 257 |
|
247 | 258 |
|
|
||
13 | 13 |
|
14 | 14 |
|
15 | 15 |
|
16 |
|
|
16 | 17 |
|
17 | 18 |
|
18 | 19 |
|
|
||
40 | 41 |
|
41 | 42 |
|
42 | 43 |
|
44 |
|
|
45 |
|
|
46 |
|
|
47 |
|
|
48 |
|
|
49 |
|
|
50 |
|
|
51 |
|
|
43 | 52 |
|
44 | 53 |
|
45 | 54 |
|
|
||
101 | 110 |
|
102 | 111 |
|
103 | 112 |
|
113 |
|
|
114 |
|
|
115 |
|
|
116 |
|
|
117 |
|
|
104 | 118 |
|
105 | 119 |
|
106 | 120 |
|
|
||
1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
|
|
23 |
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
|
35 |
|
|
36 |
|
|
37 |
|
|
38 |
|
|
39 |
|
|
40 |
|
|
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
|
47 |
|
|
48 |
|
|
49 |
|
|
50 |
|
|
51 |
|
|
52 |
|
|
53 |
|
|
54 |
|
|
55 |
|
|
||
182 | 182 |
|
183 | 183 |
|
184 | 184 |
|
185 |
|
|
185 |
|
|
186 | 186 |
|
187 | 187 |
|
188 | 188 |
|
|
||
326 | 326 |
|
327 | 327 |
|
328 | 328 |
|
329 |
|
|
329 |
|
|
330 | 330 |
|
331 | 331 |
|
332 | 332 |
|
|
||
2 | 2 |
|
3 | 3 |
|
4 | 4 |
|
5 |
|
|
5 |
|
|
6 | 6 |
|
7 | 7 |
|
8 | 8 |
|
|
||
67 | 67 |
|
68 | 68 |
|
69 | 69 |
|
70 |
|
|
71 |
|
|
70 | 72 |
|
71 | 73 |
|
72 | 74 |
|
|
||
1061 | 1063 |
|
1062 | 1064 |
|
1063 | 1065 |
|
1066 |
|
|
1064 | 1067 |
|
1065 | 1068 |
|
1066 | 1069 |
|
1067 | 1070 |
|
1071 |
|
|
1068 | 1072 |
|
1069 | 1073 |
|
1070 |
|
|
1071 |
|
|
1074 |
|
|
1075 |
|
|
1072 | 1076 |
|
1073 | 1077 |
|
1074 | 1078 |
|
1075 | 1079 |
|
1076 |
|
|
1080 |
|
|
1081 |
|
|
1082 |
|
|
1083 |
|
|
1084 |
|
|
1085 |
|
|
1086 |
|
|
1087 |
|
|
1088 |
|
|
1089 |
|
|
1090 |
|
|
1091 |
|
|
1092 |
|
|
1093 |
|
|
1077 | 1094 |
|
1078 | 1095 |
|
1079 |
|
|
1096 |
|
|
1080 | 1097 |
|
1081 |
|
|
1098 |
|
|
1082 | 1099 |
|
1083 | 1100 |
|
1084 | 1101 |
|
|
||
34 | 34 |
|
35 | 35 |
|
36 | 36 |
|
37 |
|
|
37 | 38 |
|
38 | 39 |
|
39 | 40 |
|
|
||
338 | 338 |
|
339 | 339 |
|
340 | 340 |
|
341 |
|
|
341 | 342 |
|
342 | 343 |
|
343 | 344 |
|
|
||
104 | 104 |
|
105 | 105 |
|
106 | 106 |
|
107 |
|
|
108 |
|
|
109 |
|
|
110 |
|
|
107 | 111 |
|
108 | 112 |
|
109 | 113 |
|
|
||
132 | 136 |
|
133 | 137 |
|
134 | 138 |
|
139 |
|
|
140 |
|
|
135 | 141 |
|
136 | 142 |
|
137 | 143 |
|
|
||
290 | 296 |
|
291 | 297 |
|
292 | 298 |
|
299 |
|
|
293 | 300 |
|
294 | 301 |
|
295 | 302 |
|
|
||
482 | 489 |
|
483 | 490 |
|
484 | 491 |
|
492 |
|
|
493 |
|
|
494 |
|
|
495 |
|
|
496 |
|
|
497 |
|
|
498 |
|
|
499 |
|
|
500 |
|
|
501 |
|
|
502 |
|
|
503 |
|
|
504 |
|
|
505 |
|
|
485 | 506 |
|
486 | 507 |
|
487 | 508 |
|