|
@@ -199,7 +199,8 @@ public class RNFetchBlobReq extends BroadcastReceiver implements Runnable {
|
199
|
199
|
String filename = map.getString("filename");
|
200
|
200
|
// upload from storage
|
201
|
201
|
if(data.startsWith(filePathPrefix)) {
|
202
|
|
- File file = new File(data.substring(filePathPrefix.length()));
|
|
202
|
+ String orgPath = data.substring(filePathPrefix.length());
|
|
203
|
+ File file = new File(RNFetchBlobFS.normalizePath(orgPath));
|
203
|
204
|
form.addBinaryBody(name, file, ContentType.APPLICATION_OCTET_STREAM, filename);
|
204
|
205
|
}
|
205
|
206
|
// base64 embedded file content
|
|
@@ -228,7 +229,7 @@ public class RNFetchBlobReq extends BroadcastReceiver implements Runnable {
|
228
|
229
|
// upload from storage
|
229
|
230
|
if(body.startsWith(filePathPrefix)) {
|
230
|
231
|
String filePath = body.substring(filePathPrefix.length());
|
231
|
|
- entity = new FileEntity(new File(filePath));
|
|
232
|
+ entity = new FileEntity(new File(RNFetchBlobFS.normalizePath(filePath)));
|
232
|
233
|
}
|
233
|
234
|
else {
|
234
|
235
|
blob = Base64.decode(body, 0);
|