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

Jeff Sawatzky edited comment on CB-6488 at 4/23/14 2:16 PM:
------------------------------------------------------------

I was under the impression that 
[window.resolveLocalFileSystemURL|http://www.w3.org/TR/file-system-api/#widl-LocalFileSystem-resolveLocalFileSystemURL-void-DOMString-url-EntryCallback-successCallback-ErrorCallback-errorCallback]
 was for when I have a URL, not a path. In this case I have a path. And 
according to the 
[w3|http://www.w3.org/TR/file-system-api/#the-directoryentry-interface] spec 
the path supplied to getFile can be an absolute path


was (Author: niltz):
I was under the impression that window.resolveLocalFileSystemURL was for when I 
have a URL, not a path. In this case I have a path. And according to the 
[w3|http://www.w3.org/TR/file-system-api/#the-directoryentry-interface] spec 
the path supplied to getFile can be an absolute path

> iOS getFile for captured video doesn't work
> -------------------------------------------
>
>                 Key: CB-6488
>                 URL: https://issues.apache.org/jira/browse/CB-6488
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS, Plugin File
>    Affects Versions: 3.4.0
>            Reporter: Jeff Sawatzky
>
> I use the capture plugin to capture video.  The response looks something like 
> this:
> {code}
> [
>    {
>       "name":"capturedvideo.MOV",
>       "localURL":null,
>       "type":"video/quicktime",
>       "lastModifiedDate":1398191189000,
>       "size":380489,
>       "start":0,
>       "end":0,
>       
> "fullPath":"/private/var/mobile/Applications/B43C3626-0E34-49A0-B1CC-23DF37D02750/tmp/capture-T0x17d68310.tmp.OPF7bY/capturedvideo.MOV"
>    }
> ]
> {code}
> Now my app uploads that video to our server and I want to then delete the 
> file from tmp.  So I do something like:
> {code}
> window.requestFileSystem(LocalFileSystem.TEMPORARY, 0, function (fs) {
>     fs.root.getFile(fullPath, {create: false},
>         /**
>          * We found the file on the TEMPORARY file system
>          */
>         function (fileEntry) {
>             fileEntry.remove();
>         }.bind(this),
>         /**
>          * We did not find the file on the TEMPORARY file system
>          */
>         function () {
>             console.log('fail');
>         }
>     );
> }.bind(this), function () {});
> {code}
> Where {{fullPath}} is the fullPath from the response. However that code is 
> not able to find the file, so I can't remove it (returns with error file not 
> found).



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to