|
@@ -16,6 +16,7 @@ public class RNFetchBlobConfig {
|
16
|
16
|
public String key;
|
17
|
17
|
public String mime;
|
18
|
18
|
public Boolean auto;
|
|
19
|
+ public Boolean overwrite = true;
|
19
|
20
|
public long timeout = 60000;
|
20
|
21
|
public Boolean increment = false;
|
21
|
22
|
public ReadableArray binaryContentTypes = null;
|
|
@@ -32,6 +33,12 @@ public class RNFetchBlobConfig {
|
32
|
33
|
}
|
33
|
34
|
if(options.hasKey("binaryContentTypes"))
|
34
|
35
|
this.binaryContentTypes = options.getArray("binaryContentTypes");
|
|
36
|
+ if(this.path != null && path.toLowerCase().contains("?append=true")) {
|
|
37
|
+ this.overwrite = false;
|
|
38
|
+ }
|
|
39
|
+
|
|
40
|
+ if(options.hasKey("overwrite"))
|
|
41
|
+ this.overwrite = options.getBoolean("overwrite");
|
35
|
42
|
this.key = options.hasKey("key") ? options.getString("key") : null;
|
36
|
43
|
this.mime = options.hasKey("contentType") ? options.getString("contentType") : null;
|
37
|
44
|
this.increment = options.hasKey("increment") ? options.getBoolean("increment") : false;
|