incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Becky Gibson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-837) CaptureCB - mediaFile.fullPath does not resolve to file
Date Thu, 31 May 2012 21:24:23 GMT

    [ https://issues.apache.org/jira/browse/CB-837?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13286963#comment-13286963
] 

Becky Gibson commented on CB-837:
---------------------------------

I did a quick test on Chrome Version 19.0.1084.52

This code:
            function doTest() { 
                window.webkitRequestFileSystem(TEMPORARY, 
                                         0, gotFS, fail); 
            } 
            function gotFS(fileSystem) { 
                fileSystem.root.getFile("readme.txt", {create: true}, 
                                        gotFileEntry, fail); 
            } 
            function gotFileEntry(fileEntry) { 
            	console.log("Entry.fullPath: " + fileEntry.fullPath);
            	console.log("Entry.toURL(): " + fileEntry.toURL());
            	 
            }
            function fail(error) { 
                console.log("file fail"); 
                console.log(error.message); 
            } 

returns: 
   Entry.fullPath: /readme.txt
   Entry.toURL(): filesystem:file:///temporary/readme.txt 

Which doesn't mean we shouldn't change our fullPath but I think we at least need to take other
implementations into consideration.

                
> CaptureCB - mediaFile.fullPath does not resolve to file
> -------------------------------------------------------
>
>                 Key: CB-837
>                 URL: https://issues.apache.org/jira/browse/CB-837
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CordovaJS
>    Affects Versions: 1.7.0
>         Environment: Tested on iOS
>            Reporter: Dimitri Adamou
>            Assignee: Filip Maj
>            Priority: Minor
>
> Hey there,
> Simply put here is an example
> navigator.device.capture.captureAudio(successCB, error, {limit: 1});
> function successCB(mediaFile) {
>    
>    window.resolveLocalFileSystemURI(mediaFile[0].fullPath, gotFileEntry, fsFail);
> }
> function fsFail(error) {
>    alert('we failed with code ' + error.code); //5
> }
> The issue is mediaFile[0].fullPath lacks file://localhost being prepended. Is this intentional?
> Simple work around is just to add it in using
> var path = mediaFile[0].fullPath
> if(path.indexOf("file://localhost") == -1) path = "file://localhost" + path;

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message