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:40:09 UTC

[jira] [Updated] (CB-5946) Automatic mime type in Filetransfer plugin

     [ https://issues.apache.org/jira/browse/CB-5946?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joachim Piketz updated CB-5946:
-------------------------------

    Summary: Automatic mime type in Filetransfer plugin  (was: Automatic mime type)

> Automatic mime type in Filetransfer plugin
> ------------------------------------------
>
>                 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 in filetransfer plugin.
> 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)