mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 07:02:51 +08:00
Guard against null mimeType in MediaFile.getFormatData
This commit is contained in:
parent
81f283e56f
commit
e51b4897a3
@ -127,7 +127,7 @@ public class Capture extends CordovaPlugin {
|
|||||||
|
|
||||||
// If the mimeType isn't set the rest will fail
|
// If the mimeType isn't set the rest will fail
|
||||||
// so let's see if we can determine it.
|
// so let's see if we can determine it.
|
||||||
if (mimeType == null || mimeType.equals("")) {
|
if (mimeType == null || mimeType.equals("") || "null".equals(mimeType)) {
|
||||||
mimeType = FileUtils.getMimeType(filePath);
|
mimeType = FileUtils.getMimeType(filePath);
|
||||||
}
|
}
|
||||||
Log.d(LOG_TAG, "Mime type = " + mimeType);
|
Log.d(LOG_TAG, "Mime type = " + mimeType);
|
||||||
|
Loading…
Reference in New Issue
Block a user