Good afternoon. I am trying to download a file with bottle. But it always downloads it with a .html format. How can i change it to a .txt? Thank you very much. My code is the following:
@get('/api/v1/descargarHist/<id>')
def descargar (id):
directorio, fichero = Repo.recuperar_historial(id)
return static_file(fichero, root=directorio,download='{}.txt'.format(id))
No matter how much i try, i can't change it. It always downloads it as a .html Is there a way to do this?