File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ def download_static(path=''):
4747 if os .path .isfile (full_path ):
4848 as_attachment = request .args .get ('dl' , '0' ) == '1'
4949 # http://stackoverflow.com/questions/24612366/flask-deleting-uploads-after-they-have-been-downloaded
50- return send_from_directory (directory = 'download' , filename = path , as_attachment = as_attachment )
50+ return send_from_directory (directory = 'download' , path = path , as_attachment = as_attachment )
5151 elif os .path .isdir (full_path ):
5252 lst = sorted (
5353 [{
@@ -88,8 +88,8 @@ def cut():
8888 except Exception as e :
8989 flash (e )
9090 return render_template ('cut.html' , cut_form = cut_form , form1 = form1 , form2 = form2 )
91- return send_from_directory (directory = 'download/cuts' , filename = 'demo-out.dm_84' , as_attachment = True ,
92- attachment_filename = 'demo-out.dm_84' )
91+ return send_from_directory (directory = 'download/cuts' , path = 'demo-out.dm_84' , as_attachment = True ,
92+ download_name = 'demo-out.dm_84' )
9393 else :
9494 return render_template ('cut.html' , cut_form = cut_form , form1 = form1 , form2 = form2 )
9595
You can’t perform that action at this time.
0 commit comments