@@ -678,7 +678,7 @@ private void done(Response resp) {
678
678
try (FileOutputStream fos = new FileOutputStream (file )) {
679
679
fos .write (ReactNativeBlobUtilFileTransformer .sharedFileTransformer .onWriteFile (b ));
680
680
} catch (Exception e ) {
681
- invoke_callback ("Error from file transformer:" + e .getLocalizedMessage (), null );
681
+ invoke_callback ("Error from file transformer:" + e .getLocalizedMessage (), respmap . copy () );
682
682
return ;
683
683
}
684
684
invoke_callback (null , ReactNativeBlobUtilConst .RNFB_RESPONSE_PATH , this .destPath , respmap .copy ());
@@ -709,7 +709,7 @@ private void done(Response resp) {
709
709
}
710
710
}
711
711
} catch (IOException e ) {
712
- invoke_callback ("ReactNativeBlobUtil failed to encode response data to BASE64 string." , null );
712
+ invoke_callback ("ReactNativeBlobUtil failed to encode response data to BASE64 string." , respmap . copy () );
713
713
}
714
714
break ;
715
715
case FileStorage :
@@ -741,15 +741,15 @@ private void done(Response resp) {
741
741
} catch (IOException exception ) {
742
742
exception .printStackTrace ();
743
743
}
744
- invoke_callback ("Unexpected FileStorage response file: " + responseBodyString , null );
744
+ invoke_callback ("Unexpected FileStorage response file: " + responseBodyString , respmap . copy () );
745
745
} else {
746
- invoke_callback ("Unexpected FileStorage response with no file." , null );
746
+ invoke_callback ("Unexpected FileStorage response with no file." , respmap . copy () );
747
747
}
748
748
return ;
749
749
}
750
750
751
751
if (ReactNativeBlobUtilFileResp != null && !ReactNativeBlobUtilFileResp .isDownloadComplete ()) {
752
- invoke_callback ("Download interrupted." , null , respmap .copy ());
752
+ invoke_callback ("Download interrupted." , respmap .copy ());
753
753
} else {
754
754
this .destPath = this .destPath .replace ("?append=true" , "" );
755
755
invoke_callback (null , ReactNativeBlobUtilConst .RNFB_RESPONSE_PATH , this .destPath , respmap .copy ());
@@ -760,7 +760,7 @@ private void done(Response resp) {
760
760
try {
761
761
invoke_callback (null , ReactNativeBlobUtilConst .RNFB_RESPONSE_UTF8 , new String (resp .body ().bytes (), "UTF-8" ), respmap .copy ());
762
762
} catch (IOException e ) {
763
- invoke_callback ("ReactNativeBlobUtil failed to encode response data to UTF8 string." , null );
763
+ invoke_callback ("ReactNativeBlobUtil failed to encode response data to UTF8 string." , respmap . copy () );
764
764
}
765
765
break ;
766
766
}
0 commit comments