I think you need the
'b' parameter when calling
http.file where the 2nd argument represents the filename. Without the
'b' parameter, the image variable will be a string representation of the binary data (likely UTF-8 but not 100% sure on that). It could be that subsequently converting this string representation into a
FileData object that the data becomes corrupted.
I’ll mention that native JSON doesn’t support binary data, and so what typically happens is binary data are encoded using base64, which is very different from what you’d be uploading in this way. Do you know what the server is expecting (do you have a recording to compare against)?