Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

93
Views
Can't convert base64 sent from iPhone to server

I have a problem when my site sends converted audio in base64 to my server it converts the base64 in audio format and works with it. But when the site is accessed from an iPhone and the recording arrives at the server, then a one-second recording after converting remains on the server. On all other devices and operation systems, everything comes and is processed normally. How can this be fixed? This converter's python code on server:

...
data = json.loads(await request.body())
file = open(f'{UPLOAD_DIRECTORY}/' + ID_file + '.wav', "wb")
file.write(base64.b64decode(data['audio']))
file.close()
...

This converter's JS code on site:

...
var reader = new window.FileReader();
        reader.readAsDataURL(audioBlob); 
        reader.onloadend = function() {
            base64 = reader.result;
            base64 = base64.split(',')[1];

...
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!