|
@@ -46,6 +46,12 @@ public class RNFetchBlobFileResp extends ResponseBody {
|
46
|
46
|
path = path.replace("?append=true", "");
|
47
|
47
|
mPath = path;
|
48
|
48
|
File f = new File(path);
|
|
49
|
+
|
|
50
|
+ File parent = f.getParentFile();
|
|
51
|
+ if(!parent.exists() && !parent.mkdirs()){
|
|
52
|
+ throw new IllegalStateException("Couldn't create dir: " + parent);
|
|
53
|
+ }
|
|
54
|
+
|
49
|
55
|
if(f.exists() == false)
|
50
|
56
|
f.createNewFile();
|
51
|
57
|
ofStream = new FileOutputStream(new File(path), appendToExistingFile);
|