Trying to Sort out how to use Fetch (or any Javascript) with the API to upload a file

I’m a bit stumped trying to figure out the body format for the POST request on the the http://app.qfield.cloud/api/v1/files/${projectid}/${filename} path. I can get it to return a 200, but the limited documentation says I should be getting a 201 and the file isn’t uploading.

Thanks in advance if anyone has a hint.


Imported from GitHub discussion by @blairmitch73 on 2023-08-16T18:48:53Z