|
@@ -2,6 +2,7 @@ package com.RNFetchBlob;
|
2
|
2
|
|
3
|
3
|
import com.facebook.react.bridge.Arguments;
|
4
|
4
|
import com.facebook.react.bridge.Callback;
|
|
5
|
+import com.facebook.react.bridge.ReactApplicationContext;
|
5
|
6
|
import com.facebook.react.bridge.ReactContext;
|
6
|
7
|
import com.facebook.react.bridge.WritableMap;
|
7
|
8
|
import com.facebook.react.modules.core.DeviceEventManagerModule;
|
|
@@ -20,9 +21,9 @@ public class RNFetchBlobFileHandler extends FileAsyncHttpResponseHandler {
|
20
|
21
|
ReactContext mCtx;
|
21
|
22
|
String mTaskId;
|
22
|
23
|
|
23
|
|
- RNFetchBlobFileHandler(ReactContext ctx, String taskId, Callback onResponse) {
|
24
|
|
- // save temp file to RNFetchBlobCache/dltmp${taskId}
|
25
|
|
- super(new File(RNFetchBlobFS.TempFilePath + taskId), false, false);
|
|
24
|
+ RNFetchBlobFileHandler(ReactApplicationContext ctx, String taskId, Callback onResponse) {
|
|
25
|
+ // save temp file to application storage
|
|
26
|
+ super(new File(RNFetchBlobFS.getTmpPath(ctx, taskId)), false, false);
|
26
|
27
|
this.onResponse = onResponse;
|
27
|
28
|
this.mTaskId = taskId;
|
28
|
29
|
this.mCtx = ctx;
|