You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Eric dos Reis Santos (JIRA)" <ji...@apache.org> on 2016/02/03 15:20:40 UTC
[jira] [Closed] (CB-10512) Nothing happens when trying to move a
file
[ https://issues.apache.org/jira/browse/CB-10512?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric dos Reis Santos closed CB-10512.
-------------------------------------
Resolution: Resolved
It was my mistake, in the function moveFile, I was sending the directory with the file name, in the moveFrom parameter in my service. The correct way is set only the directory:
$cordovaFile.moveFile(moveFrom, currentFileName, cordova.file.dataDirectory + moveTo, newFileName)
.then(function (success)
{ alert("Yeah Success " + JSON.stringify(success)); }
, function (error)
{ alert("Fucking error " + JSON.stringify(error)); }
);
Cordova file could return an invalid directory error.
> Nothing happens when trying to move a file
> ------------------------------------------
>
> Key: CB-10512
> URL: https://issues.apache.org/jira/browse/CB-10512
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android, CordovaJS
> Environment: Android
> Reporter: Eric dos Reis Santos
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> I was to able to create a directory, and I'm trying to move a image stored in "temp files" directory to my directory created in file system, but nothing happens, the promise doesn't return error and success, absolutely nothing happens.
> The cordova file plugin was added in my app.
> I debugged the app in my device with Android Studio, and I saw an error in log cat: "Error in Success callbackId: File285873816 : TypeError: fileSystem.getFile is not a function" in source: file:///android_asset/www/cordova.js
> Someone can help me?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org