Is possibile to donwload a zip from url by javascript or html5 (client side)?
I'm trying to use ajax :
$.ajax({
type: 'GET',
//dataType: "json",
//crossDomain: true,
crossOrigin: true,
//url : "https://pdftron.s3.amazonaws.com/files/xod/NY_fun_list." + docType,
url: 'http://www.pdftron.com/webviewer/demo/doc/WebViewer_Developer_Guide.pdf',
headers:{'Access-Control-Allow-Origin': '*'},
success: function (responseData, textStatus, jqXHR) {
console.log('in');
//data = JSON.parse(responseData['AuthenticateUserResult']);
console.log(data);
},
error: function (responseData, textStatus, errorThrown) {
alert('Get non riuscita');
}
});
I have always the same problem about CROSS Origin and I don't know if this is the right way to do it. Any advice?
Thanks.