|
@@ -179,9 +179,14 @@ public class RNFetchBlobBody extends RequestBody{
|
179
|
179
|
}
|
180
|
180
|
}
|
181
|
181
|
} else {
|
182
|
|
- byte[] bytes = Base64.decode(rawBody, 0);
|
183
|
|
- contentLength = bytes.length;
|
184
|
|
- requestStream = new ByteArrayInputStream(bytes);
|
|
182
|
+ try {
|
|
183
|
+ byte[] bytes = Base64.decode(rawBody, 0);
|
|
184
|
+ contentLength = bytes.length;
|
|
185
|
+ requestStream = new ByteArrayInputStream(bytes);
|
|
186
|
+ } catch(Exception ex) {
|
|
187
|
+
|
|
188
|
+ Log.e("error", ex.getLocalizedMessage());
|
|
189
|
+ }
|
185
|
190
|
}
|
186
|
191
|
if(requestStream != null)
|
187
|
192
|
pipeStreamToSink(requestStream, sink);
|