Skip to content

Commit

Permalink
update for parameter deprecation in flask send_file
Browse files Browse the repository at this point in the history
  • Loading branch information
scott2b committed Feb 1, 2024
1 parent 6e4675c commit 4554c90
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion storymap/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,12 @@ def cleanup_temp_file(response):
for key in key_list:
file_name = key.split(key_prefix)[-1]
zip_file.writestr(file_name, storage.get_contents(key))
return send_file(temp_path, mimetype="application/zip", as_attachment=True, attachment_filename=('storymap-%s.zip' % id))
return send_file(
temp_path,
mimetype="application/zip",
as_attachment=True,
download_name=('storymap-%s.zip' % id)
)


def fix_image_urls(jsonstring, key_prefix, image_files):
Expand Down

0 comments on commit 4554c90

Please sign in to comment.