You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Joachim Piketz (JIRA)" <ji...@apache.org> on 2014/01/30 13:38:09 UTC
[jira] [Created] (CB-5946) Automatic mime type
Joachim Piketz created CB-5946:
----------------------------------
Summary: Automatic mime type
Key: CB-5946
URL: https://issues.apache.org/jira/browse/CB-5946
Project: Apache Cordova
Issue Type: Improvement
Components: Android, Plugin File Transfer
Affects Versions: 3.3.0
Reporter: Joachim Piketz
Feature request: automatically detect mime type.
The following works for me in Android:
{code}
String mime = "application/octet-stream";
try
{
mime = cordova.getActivity().getContentResolver().getType(sourceUri);
}
catch (Exception e)
{
Log.e(LOG_TAG, e.getMessage(), e);
}
final String mimeType = mime;
Log.d(LOG_TAG, "mimeType: " + mimeType);
{code}
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)