Skip to content

Commit

Permalink
Merge pull request #65 from civier/civier-patch-3
Browse files Browse the repository at this point in the history
Update download_zip.py
  • Loading branch information
yjmantilla authored Aug 12, 2024
2 parents 105a680 + 0457e04 commit c91ef31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions front/app/download_zip.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ def download_files(list_files,filename):
#response['Content-Disposition'] = 'attachment; filename= "%s"' % filename

# See https://stackoverflow.com/a/53390515/14068216
response = send_file(filename, mimetype="application/x-zip-compressed", attachment_filename=name, as_attachment=True)
response = send_file(filename, mimetype="application/x-zip-compressed", download_name=name, as_attachment=True)
response.headers["x-filename"] = name
response.headers["Access-Control-Expose-Headers"] = 'x-filename'
# # ..and correct content-disposition
# response['Content-Disposition'] = 'attachment; filename=%s' % zip_filename

return response
return response

0 comments on commit c91ef31

Please sign in to comment.