mirror of
https://github.com/silkimen/cordova-plugin-advanced-http.git
synced 2026-05-31 00:00:07 +08:00
update cordova file plugin dependency to new cordova-plugin-file name/version
This commit is contained in:
+1
-1
@@ -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 {
|
||||
|
||||
Vendored
+3
-1
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user