From e9adf76d23f308d00edc99daeefc511cd4888cc7 Mon Sep 17 00:00:00 2001 From: MrCsabaToth Date: Sat, 21 Sep 2024 23:58:32 -0700 Subject: [PATCH] Firebase Function will be able to get parameters from Form format as well #53 --- functions/fn_impl/chirp.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/functions/fn_impl/chirp.py b/functions/fn_impl/chirp.py index a623cb6..928129b 100644 --- a/functions/fn_impl/chirp.py +++ b/functions/fn_impl/chirp.py @@ -84,6 +84,7 @@ def chirp(req: https_fn.Request) -> https_fn.Response: request_json = req.get_json(silent=True) request_args = req.args + request_form = req.form transcripts = [] project_id = 'open-mmpa' @@ -93,6 +94,8 @@ def chirp(req: https_fn.Request) -> https_fn.Response: recording_file_name = request_json['recording_file_name'] elif request_args and 'recording_file_name' in request_args: recording_file_name = request_args['recording_file_name'] + elif request_form and 'recording_file_name' in request_form: + recording_file_name = request_form['recording_file_name'] else: recording_file_name = None