Fixes OctoPrint.files.download method
This commit is contained in:
parent
e57ed92294
commit
bdc5d72613
1 changed files with 7 additions and 5 deletions
|
|
@ -23,7 +23,13 @@
|
|||
return OctoPrint.issueCommand(url, command, data, opts);
|
||||
};
|
||||
|
||||
var getFile = function(location, filename, opts) {
|
||||
return OctoPrint.get(resourceForFile(location, filename), opts);
|
||||
};
|
||||
|
||||
OctoPrint.files = {
|
||||
get: getFile,
|
||||
|
||||
list: function (opts) {
|
||||
return OctoPrint.get(url, opts);
|
||||
},
|
||||
|
|
@ -32,10 +38,6 @@
|
|||
return OctoPrint.get(resourceForLocation(location), opts);
|
||||
},
|
||||
|
||||
get: function (location, filename, opts) {
|
||||
return OctoPrint.get(resourceForFile(location, filename), opts);
|
||||
},
|
||||
|
||||
select: function (location, filename, print, opts) {
|
||||
print = print || false;
|
||||
|
||||
|
|
@ -64,7 +66,7 @@
|
|||
|
||||
download: function (location, filename, opts) {
|
||||
var deferred = $.Deferred();
|
||||
exports.get(location, filename, opts)
|
||||
getFile(location, filename, opts)
|
||||
.done(function (response) {
|
||||
OctoPrint.download(response.refs.download, opts)
|
||||
.done(function () {
|
||||
|
|
|
|||
Loading…
Reference in a new issue