Skip to content

Commit 71fcebb

Browse files
authored
Merge pull request #745 from juliar/android-file-path-encoding-fix
Fix addAndroidDownloads for paths containing %
2 parents 3f60084 + f563d50 commit 71fcebb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public void run() {
177177
req.setDescription(options.addAndroidDownloads.getString("description"));
178178
}
179179
if(options.addAndroidDownloads.hasKey("path")) {
180-
req.setDestinationUri(Uri.parse("file://" + options.addAndroidDownloads.getString("path")));
180+
req.setDestinationUri(Uri.fromFile(new File(options.addAndroidDownloads.getString("path"))));
181181
}
182182
// #391 Add MIME type to the request
183183
if(options.addAndroidDownloads.hasKey("mime")) {

0 commit comments

Comments
 (0)