kobotoolbox / kpi

kpi is the (frontend) server for KoboToolbox. It includes an API for users to access data and manage their forms, question library, sharing settings, create reports, and export data.
https://www.kobotoolbox.org
GNU Affero General Public License v3.0
126 stars 170 forks source link

AMR audio attached through Enketo throw an error when converted #4598

Open JacquelineMorrissette opened 10 months ago

JacquelineMorrissette commented 10 months ago

Description

Converting an .amr audio file that has been uploaded to a submission in Enketo produces an error:

detail "Conversion is not supported for application/octet-stream"

Steps to Reproduce

  1. Create a with an audio field
  2. Save and deploy
  3. Open the form in Enketo and upload an .amr file
  4. Submit the form and go to the conversion endpoint /api/v2/assets/{asset_uid}/data/{data_id}/attachments/?xpath=Path_to_audio_question&format=mp3
  5. Receive error

Expected behavior

The browser should open an MP3 file

Actual behavior

detail "Conversion is not supported for application/octet-stream"

Additional details

FFMPEG might just need an additional codec installed to make this happen, or it might be as easy as re-checking the MIME-type on .amr files

JacquelineMorrissette commented 10 months ago

Assigned to @noliveleger for delegation