Created
August 23, 2017 10:41
-
-
Save lapshinmr/0547dd36c77898205238aef450f7ce4f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| return send_file(BytesIO(open(z.filename, 'rb').read()), | |
| attachment_filename=curdir_basename + '.zip', | |
| as_attachment=True) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import zipfile | |
| with zipfile.ZipFile(os.path.join(curdir, curdir_basename + '.zip'), 'w') as z: | |
| for f_path in [a_path, w_path, q_path]: | |
| z.write(f_path, os.path.basename(f_path)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment