Skip to content

Commit e73e279

Browse files
author
Ron Radtke
committed
Fixes #88
1 parent e5a0bc2 commit e73e279

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

android/src/main/java/com/ReactNativeBlobUtil/ReactNativeBlobUtilReq.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ private void done(Response resp) {
604604
ReactNativeBlobUtilFileResp ReactNativeBlobUtilFileResp;
605605

606606
try {
607-
ReactNativeBlobUtilFileResp = (ReactNativeBlobUtilFileResp) responseBody;
607+
ReactNativeBlobUtilFileResp = new ReactNativeBlobUtilFileResp(responseBody);
608608
} catch (ClassCastException ex) {
609609
// unexpected response type
610610
if (responseBody != null) {

android/src/main/java/com/ReactNativeBlobUtil/Response/ReactNativeBlobUtilFileResp.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ public class ReactNativeBlobUtilFileResp extends ResponseBody {
3535
FileOutputStream ofStream;
3636
boolean isEndMarkerReceived;
3737

38+
public ReactNativeBlobUtilFileResp(ResponseBody body) {
39+
super();
40+
this.originalBody = body;
41+
}
42+
3843
public ReactNativeBlobUtilFileResp(ReactApplicationContext ctx, String taskId, ResponseBody body, String path, boolean overwrite) throws IOException {
3944
super();
4045
this.rctContext = ctx;

0 commit comments

Comments
 (0)