What’s the correct way to send an audio file from a HISE plugin to a backend server?
-
This post is deleted! -
@David-Healey Okay, How do you mean? I don't see how I can do that because unless the backend server is also running on a users device, it can't access the file using its system path and my backend server is hosted on vercel
-
@daniel_101 Aha ok, when you said backend I didn't realise you meant a remote system. What about using cURL to upload the file to your server?
-
You can probably convert the audio file to Base64 and send that way. Only for small files though.
-
@David-Healey Thanks david, Using cURL sounds nice. Can I use cURL within HISE while in production?
I am currently using the Server.callWithPOST function but I can only send the file in a string format (in base64) or as a multipart/form-data format. -
@dannytaurus Thanks Danny, Yes sending it as a base64 string seemed to the best approach and I've tried using the "File.loadAsBase64()" function to do that but the function on HISE did not return a valid base64 string, As I explained in a previous post and as of the latest update, isn't part of the "File" API anymore.
I would be very grateful if there is any other way to convert a file to base64 in HISE. -
@daniel_101 Yes I think curl should work across platforms, but older versions of Windows might be missing it. I can't remember the details there.
@daniel_101 said in What’s the correct way to send an audio file from a HISE plugin to a backend server?:
"File.loadAsBase64()" function to do that but the function on HISE did not return a valid base64 string,
The function is
File.loadAsBase64String();It's still in the API. -
@David-Healey said in What’s the correct way to send an audio file from a HISE plugin to a backend server?:
The function is File.loadAsBase64String(); It's still in the API.
Yes the
File.loadAsBase64String()function used to exist on HISE but I did not seem to return a valid base64 string. And as of the HISE version I installed today, theFile.loadAsBase64String();no longer exists. Here's a screenshot picture from the HISE API interface:

-
@daniel_101 said in What’s the correct way to send an audio file from a HISE plugin to a backend server?:
HISE version I installed today
Built from the develop branch?
-
@David-Healey said in What’s the correct way to send an audio file from a HISE plugin to a backend server?:
Built from the develop branch?
To be honest, I do not know much about how the HISE github repo is structured, but I do not think its from the develop branch, because I downloaded from the
Download Installerpage on the HISE website. url: https://github.com/christophhart/HISE/releases