diff --git a/lib/client/menu.js b/lib/client/menu.js index 85250ed0..c8cb1033 100644 --- a/lib/client/menu.js +++ b/lib/client/menu.js @@ -47,11 +47,19 @@ CloudCommander.Menu.getConfig = (function(){ }}, download: {name: 'Download',callback: function(key, opt){ + var lCurrent = lThis.getCurrentFile(); - var lLink = lThis.getByTag('a', lCurrent)[0]; + var lLink = lThis.getByTag('a', lCurrent)[0].href; + + console.log('downloadin file ' + lLink +'...'); + var lDownload = lThis.anyload({ + name : 'iframe', + className : 'hidden', + src : lLink + '?download' + }); - console.log('downloadin file...'); + document.body.removeChild(lDownload); }} } };