Skip to content

Commit 23b1358

Browse files
chrisxu2016prihoda
authored andcommitted
fix issue #30
Fix the parameter name error of flask.send_file function
1 parent 58e6e6f commit 23b1358

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

biophi/common/utils/io.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -373,9 +373,9 @@ def send_text(text, name, extension='txt', timestamp=True):
373373

374374
return send_file(
375375
bytesio,
376-
attachment_filename=f'{name}.{extension}',
376+
download_name=f'{name}.{extension}',
377377
as_attachment=True,
378-
cache_timeout=0
378+
max_age=0
379379
)
380380

381381

@@ -480,9 +480,9 @@ def send_excel(df_dict: Dict[str, pd.DataFrame], name, timestamp=True):
480480
name += time.strftime("_%Y-%m-%d_%H-%M-%S")
481481
return send_file(
482482
output,
483-
attachment_filename=f'{name}.xlsx',
483+
download_name=f'{name}.xlsx',
484484
as_attachment=True,
485-
cache_timeout=0
485+
max_age=0
486486
)
487487

488488

0 commit comments

Comments
 (0)