Skip to content

Commit

Permalink
Firebase Function will be able to get parameters from Form format as …
Browse files Browse the repository at this point in the history
…well #53
  • Loading branch information
MrCsabaToth committed Sep 22, 2024
1 parent 03e0b40 commit e9adf76
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions functions/fn_impl/chirp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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

Expand Down

0 comments on commit e9adf76

Please sign in to comment.