Frontend code:
Ext.get('outputuser'). on('click', function(e){
Ext.MessageBox.confirm('Prompt', 'Are you sure you want to export users?', function(btn){
if(btn=="yes") {
Ext.Ajax.request({
url: "You can get the url of the file to be downloaded",
success:function(res){
var obj =Ext.decode(res.responseText) ;
//alert(res.responseText);
window.location.href =obj.path; ;
Backend:
Copy code