You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Gerardo Parra (JIRA)" <ji...@apache.org> on 2012/11/12 12:59:12 UTC

[jira] [Created] (CB-1835) Camera.getPicture gives error when get a picture from photo library with spaces in its name on Android

Gerardo Parra created CB-1835:
---------------------------------

             Summary: Camera.getPicture gives error when get a picture from photo library with spaces in its name on Android
                 Key: CB-1835
                 URL: https://issues.apache.org/jira/browse/CB-1835
             Project: Apache Cordova
          Issue Type: Bug
          Components: Android
    Affects Versions: 2.2.0
         Environment: Android
            Reporter: Gerardo Parra
            Assignee: Joe Bowser


When you use Camera.getPicture to get a photo from photo library, it returns error if the file name has spaces in its name. In my case, I use a Samsung Galaxy S SCL smartphone and the camera saves the photos using spaces. If I try to get a picture without spaces, it returns successfully the file.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (CB-1835) Camera.getPicture gives error when get a picture from photo library with spaces in its name on Android

Posted by "Simon MacDonald (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1835?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon MacDonald reassigned CB-1835:
-----------------------------------

    Assignee: Simon MacDonald  (was: Joe Bowser)
    
> Camera.getPicture gives error when get a picture from photo library with spaces in its name on Android
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CB-1835
>                 URL: https://issues.apache.org/jira/browse/CB-1835
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.2.0
>         Environment: Android
>            Reporter: Gerardo Parra
>            Assignee: Simon MacDonald
>
> When you use Camera.getPicture to get a photo from photo library, it returns error if the file name has spaces in its name. In my case, I use a Samsung Galaxy S SCL smartphone and the camera saves the photos using spaces. If I try to get a picture without spaces, it returns successfully the file.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (CB-1835) Camera.getPicture gives error when get a picture from photo library with spaces in its name on Android

Posted by "Simon MacDonald (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1835?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon MacDonald resolved CB-1835.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 2.3.0

Fixed the issue with spaces in file names failing to be selected.
                
> Camera.getPicture gives error when get a picture from photo library with spaces in its name on Android
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CB-1835
>                 URL: https://issues.apache.org/jira/browse/CB-1835
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.2.0
>         Environment: Android
>            Reporter: Gerardo Parra
>            Assignee: Simon MacDonald
>             Fix For: 2.3.0
>
>
> When you use Camera.getPicture to get a photo from photo library, it returns error if the file name has spaces in its name. In my case, I use a Samsung Galaxy S SCL smartphone and the camera saves the photos using spaces. If I try to get a picture without spaces, it returns successfully the file.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1835) Camera.getPicture gives error when get a picture from photo library with spaces in its name on Android

Posted by "Simon MacDonald (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13495256#comment-13495256 ] 

Simon MacDonald commented on CB-1835:
-------------------------------------

I'm already working on a similar issue. Should be able to check in a fix today.
                
> Camera.getPicture gives error when get a picture from photo library with spaces in its name on Android
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CB-1835
>                 URL: https://issues.apache.org/jira/browse/CB-1835
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.2.0
>         Environment: Android
>            Reporter: Gerardo Parra
>            Assignee: Simon MacDonald
>
> When you use Camera.getPicture to get a photo from photo library, it returns error if the file name has spaces in its name. In my case, I use a Samsung Galaxy S SCL smartphone and the camera saves the photos using spaces. If I try to get a picture without spaces, it returns successfully the file.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1835) Camera.getPicture gives error when get a picture from photo library with spaces in its name on Android

Posted by "Simon MacDonald (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13495279#comment-13495279 ] 

Simon MacDonald commented on CB-1835:
-------------------------------------

The call:

            MimeTypeMap map = MimeTypeMap.getSingleton();
            return map.getMimeTypeFromExtension(MimeTypeMap.getFileExtensionFromUrl(filename));

returns "null" if the filename has a space in it which is just a pain in the, hey, hey kids! I was using that check to make sure someone did not try to get a text file using getPicture. Guarding against the false negative now.

Next step I need to take a look at when something like DropBox returns a url encoded file URI.
                
> Camera.getPicture gives error when get a picture from photo library with spaces in its name on Android
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CB-1835
>                 URL: https://issues.apache.org/jira/browse/CB-1835
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.2.0
>         Environment: Android
>            Reporter: Gerardo Parra
>            Assignee: Simon MacDonald
>
> When you use Camera.getPicture to get a photo from photo library, it returns error if the file name has spaces in its name. In my case, I use a Samsung Galaxy S SCL smartphone and the camera saves the photos using spaces. If I try to get a picture without spaces, it returns successfully the file.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira