Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created Feb 4, 2021
Embed
What would you like to do?
@app.route("/tomar_foto_descargar")
def descargar_foto():
# La respuesta puede venir de cualquier lugar
respuesta = Response(obtener_frame_camara())
respuesta.headers["Content-Type"] = "image/jpeg"
respuesta.headers["Content-Transfer-Encoding"] = "Binary"
respuesta.headers["Content-Disposition"] = "attachment; filename=\"foto.jpg\""
return respuesta
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment