0
Does anyone know why this error is happening when I go to download a spreadsheet... Being that if I refresh the page the error does not happen again
Controller
$scope.GerarPlanilha = function (){
$http({
url: 'http:/php/RelatorioFisico.php',
method: 'POST',
responseType: 'arraybuffer',
headers: {
'Content-type': 'application/json',
'Accept': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
}
}).success(function(data){
var blob = new Blob([data], {type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"});
saveAs(blob,'ContratosPendentes'+'.xlsx');
}).error(function(){
});
};
guess missing specify file size..
Content-Length
– Daniel Omine
no controller?? because in my php headers I header('Content-Length: ' . filesize($file));
– Luiz Fábio