具体是这样子的,在服务器上用django上面通过下面的代码返回一个pdf
response = HttpResponse(content_type='application/pdf')
response['Content-Disposition'] = 'attachment; filename="' + orderNumber + '.pdf"'
response.write(pdf)
return response
现在在我的电脑上能够得到这个pdf,其它电脑上却不能够,请问这是为什么?
浏览器中post部分代码为:
$.ajax({
type:'POST',
url:'/orderplace/',
data:{provider:provider, providerId:providerId, orderNumber:orderNumber},
success:function(resultData) {
//alert(resultData);
console.log(resultData);
}
});
你有测试过哪些浏览器?
pdf变量是什么?
下面这种方式在我做的项目里是可以的: