-
-
Save parzibyte/676d79affb1275dda30125a94521d801 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Cuando toman la foto | |
@app.route("/tomar_foto_descargar") | |
def descargar_foto(): | |
ok, frame = obtener_frame_camara() | |
if not ok: | |
abort(500) | |
return | |
respuesta = Response(frame) | |
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