Question/Issue:
I’m trying to build a website where users can upload a .wav file, which I then upload to Edge Impulse through the Ingestion API. Here is the html/javascript code I wrote:
When I test it out, I get an error with code 500 that says “unexpected request”. I suspect that something is wrong with the request, since when I inspect the network it says that the request header has content-type “multipart/form-data”, while the response header has content-type “application/json”:
Is there something wrong with my code, or is what I’m trying to do not allowed by the Ingestion API? Project ID:
You may need the following in the header documented here:
'Content-Type': multipart/form-data
Also try running the Curl command so we can eliminate possible side effects from you custom code. 1st things 1st: get the ingestion working then move on from there.
Thanks for the reply. When I try to include the content-type in the header, I get an error that says “Multipart: Boundary not found”. From what I’ve read online, the browser is supposed to automatically set the content-type as well as the boundary.