cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Grieve (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CB-6488) iOS getFile for captured video doesn't work
Date Wed, 23 Apr 2014 00:48:18 GMT

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

Andrew Grieve resolved CB-6488.
-------------------------------

    Resolution: Not a Problem

getFile() can only get files within the given root. What you want is window.resolveLocalFileSystemURL()

> 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)

Mime
View raw message