Skip to content

Commit

Permalink
boton de descargas funcional
Browse files Browse the repository at this point in the history
  • Loading branch information
lriveraBanco committed May 6, 2024
1 parent af1cb7d commit 65b7bbd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions roop/Frontend/app.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from flask import Flask, render_template, request, redirect, url_for, jsonify, flash, send_file
from flask import Flask, render_template, request, redirect, url_for, jsonify, flash, send_file, send_from_directory
import os
import base64
import secrets
Expand Down Expand Up @@ -55,9 +55,11 @@ def transform():

@app.route('/download')
def download():
file_path = '/content/Proyecto_ia/resultados/resultado.mp4'
return send_file(file_path, as_attachment=True)

#file_path = '/content/Proyecto_ia/resultados/resultado.mp4'
#return send_file(file_path, as_attachment=True)
file_directory = '/content/Proyecto_ia/resultados/'
filename = 'resultado.mp4'
return send_from_directory(directory=file_directory, path=filename, as_attachment=True)

if __name__ == '__main__':
app.run(debug=True)

0 comments on commit 65b7bbd

Please sign in to comment.