cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ian Clelland (JIRA)" <>
Subject [jira] [Commented] (CB-6249) Camera fails to return an actual FILE_URI it always returns content://
Date Tue, 18 Mar 2014 04:21:45 GMT


Ian Clelland commented on CB-6249:

As I surmised getMetadata **only** contains _modificationTime_ and _size_ as its properties
I saw that as well; I looked after I left that comment. I was thinking of {{FileEntry.file()}},
which returns a File object which *does* include a MIME type. Still not the most convenient
interface, but it is there.

Looking a bit deeper at the code for {{resolveLocalFileSystemURI}}, the difference is that
content:// URLs used to be resolved immediately into files, whereas we now preserve the original
content resolver information to access the data.

I don't think we can completely go back to the old behaviour: it caused other errors, when
the resource itself turned out to be non-local. There may be a way to get some of that behaviour
back; I'll think about that a bit and post back in the morning.

> Camera fails to return an actual FILE_URI it always returns content://
> ----------------------------------------------------------------------
>                 Key: CB-6249
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android, Plugin Camera, Plugin File
>    Affects Versions: 3.4.0
>         Environment: Current Node Version
>     v0.10.25
> Current Cordova CLI Version
>     3.4.0-0.1.0
> Android
>            Reporter: Ralph S Theart
>              Labels: camera, file
> No matter what I do I can not get a url of file:///... all I get is 
> {code}
> content://media/external/images/media/1357
> {code}
> Here is my very simple code....
> {code}
>    console.log('GOT IMAGE: '+imageURI);
>    window.resolveLocalFileSystemURL(imageURI, function(entry){
>       console.log( + " " +entry.fullPath);
>    }, function(e){
>       console.log('Some error occured: '+e.code);
>    }); 
> }, onPhotoFail, {
>    destinationType: 1, 
>    sourceType: pictureSource,
>    mediaType : Camera.MediaType.ALLMEDIA,
>    encodingType: 0,
>    allowEdit : false,
>    correctOrientation:true,
>    saveToPhotoAlbum: false,
>    quality: 50
> });
> {code}
> I always get content://... for the returned path from camera and even the same thing
when I resolve the url. Can you confirm this bug?

This message was sent by Atlassian JIRA

View raw message