Skip to content

Commit edbef37

Browse files
committed
Fix some missed "attachment_filename" replacements
1 parent 267dc1e commit edbef37

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

appyter/render/flask_app/drs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,4 @@ def drs_objects_fetch(file_id):
9191
except:
9292
return abort(404)
9393
#
94-
return send_file(fs.open(file_info['name'], 'rb'), attachment_filename=url_filename(file_info['name']), conditional=True)
94+
return send_file(fs.open(file_info['name'], 'rb'), as_attachment=True, download_name=url_filename(file_info['name']), conditional=True)

appyter/render/flask_app/export.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def export(path):
2828
if format == 'html':
2929
exporter = get_html_exporer()
3030
body, _rcs = exporter.from_notebook_node(nb)
31-
return send_file(io.BytesIO(body.encode()), mimetype='text/html', as_attachment=True, attachment_filename='output.html')
31+
return send_file(io.BytesIO(body.encode()), mimetype='text/html', as_attachment=True, download_name='output.html')
3232
elif format == 'zip':
3333
metadata = nb.get('metadata', {}).get('appyter', {})
3434
files = metadata.get('nbexecute', {}).get('files', metadata.get('nbconstruct', {}).get('files', {}))
@@ -42,5 +42,5 @@ def export(path):
4242
with data_fs.open(f, 'rb') as fr:
4343
with zf.open(f, 'w') as zfw:
4444
shutil.copyfileobj(fr, zfw)
45-
return send_file(tmp_fs.open('output.zip', 'rb'), mimetype='application/zip', as_attachment=True, attachment_filename='output.zip')
45+
return send_file(tmp_fs.open('output.zip', 'rb'), mimetype='application/zip', as_attachment=True, download_name='output.zip')
4646
abort(404)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "appyter"
3-
version = "0.21.1"
3+
version = "0.21.2"
44
description = "This module enables you to turn your jupyter notebook into a jinja2 template-driven web application."
55
authors = [
66
{name = "Daniel Clarke",email = "u8sand@gmail.com"}

0 commit comments

Comments
 (0)