if pdf:
response = HttpResponse(pdf, content_type='application/pdf')
filename = "Invoice_%s.pdf" %(user_name)
content = "inline; filename='%s'" %(filename)
download = request.GET.get("download")
return response
return HttpResponse("Not found")
这是代码views.py,它的一部分。我试过很多东西。即使是本地存储在我的电脑上的pdf也只能下载,不能显示。我也用过
目前没有回答
相关问题 更多 >
编程相关推荐