diff --git a/android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java b/android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java index 5fde54097..a5776e594 100644 --- a/android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java +++ b/android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java @@ -766,11 +766,9 @@ public void onReceive(Context context, Intent intent) { return; } String contentUri = c.getString(c.getColumnIndex(DownloadManager.COLUMN_LOCAL_URI)); - if ( contentUri != null && - options.addAndroidDownloads.hasKey("mime") && - options.addAndroidDownloads.getString("mime").contains("image")) { + if ( contentUri != null ) { Uri uri = Uri.parse(contentUri); - Cursor cursor = appCtx.getContentResolver().query(uri, new String[]{android.provider.MediaStore.Images.ImageColumns.DATA}, null, null, null); + Cursor cursor = appCtx.getContentResolver().query(uri, new String[]{android.provider.MediaStore.Files.FileColumns.DATA}, null, null, null); // use default destination of DownloadManager if (cursor != null) { cursor.moveToFirst(); diff --git a/package.json b/package.json index a0fa1b5c9..10feec8d2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "rn-fetch-blob", - "version": "0.12.0", + "name": "rn-fetch-blob-v2", + "version": "0.14.1", "description": "A module provides upload, download, and files access API. Supports file stream read/write for process large files.", "main": "index.js", "scripts": { @@ -22,7 +22,7 @@ "image header" ], "repository": { - "url": "https://github.com/joltup/rn-fetch-blob.git" + "url": "https://github.com/iJimmyWei/rn-fetch-blob" }, "author": "Joltup", "license": "MIT", diff --git a/rn-fetch-blob.podspec b/rn-fetch-blob.podspec index 4edbd5cc9..d990640b2 100644 --- a/rn-fetch-blob.podspec +++ b/rn-fetch-blob.podspec @@ -2,7 +2,7 @@ require "json" package = JSON.parse(File.read('package.json')) Pod::Spec.new do |s| - s.name = package['name'] + s.name = 'rn-fetch-blob' s.version = package['version'] s.summary = package['description'] s.requires_arc = true