فهرست منبع

cambiato il modo di fare download dei documenti

Mauro 10 ماه پیش
والد
کامیت
b065e35411
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      documento/views.py

+ 1 - 1
documento/views.py

@@ -209,7 +209,7 @@ def welcome(request,utente=None):
           # scarica il file
           response = None
           with open(os.path.join(pathzipfile,filePreparato),'rb') as f:
-            response =  FileResponse(f.read(),content_type='application/zip',as_attachment=False)
+            response =  HttpResponse(f.read(),content_type='application/zip')
             response['Content-Disposition'] = 'attachment; filename={}'.format(filePreparato)
           os.unlink(os.path.join(pathzipfile,filePreparato))
           return response