update cordova file plugin dependency to new cordova-plugin-file name/version

This commit is contained in:
Denis Babineau
2015-07-15 15:21:39 -03:00
parent 6ea22f99e8
commit 20f39b32f1
3 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -14,7 +14,7 @@
<engine name="cordova" version=">=3.0.0" />
</engines>
<dependency id="org.apache.cordova.file" url="https://github.com/apache/cordova-plugin-file" commit="r0.2.5" />
<dependency id="cordova-plugin-file" version=">=2.0.0" />
<js-module src="www/cordovaHTTP.js" name="CordovaHttpPlugin">
<clobbers target="plugins.CordovaHttpPlugin" />
@@ -45,7 +45,7 @@ public class CordovaHttpDownload extends CordovaHttp implements Runnable {
URI uri = new URI(filePath);
File file = new File(uri);
request.receive(file);
JSONObject fileEntry = FileUtils.getEntry(file);
JSONObject fileEntry = FileUtils.getFilePlugin().getEntryForFile(file);
response.put("file", fileEntry);
this.getCallbackContext().success(response);
} else {
+3 -1
View File
@@ -52,11 +52,13 @@ var http = {
*
*/
var win = function(result) {
var entry = new (require('org.apache.cordova.file.FileEntry'))();
var entry = new (require('cordova-plugin-file.FileEntry'))();
entry.isDirectory = false;
entry.isFile = true;
entry.name = result.file.name;
entry.fullPath = result.file.fullPath;
entry.filesystem = new FileSystem(result.file.filesystemName || (result.file.filesystem == window.PERSISTENT ? 'persistent' : 'temporary'));
entry.nativeURL = result.file.nativeURL;
success(entry);
};
return exec(win, failure, "CordovaHttpPlugin", "downloadFile", [url, params, headers, filePath]);