Upload file to Seafile using PHP

I’m a bit at loss here, does someone have an example on how to upload a file to a upload link already retrieved from seafile?

I tried multiple curl scripts, but always get back 400 bad request.

It does work when I use javascript directly, but need to have a PHP solution as well.

I think this should do: https://manual.seafile.com/develop/web_api_v2.1.html#upload-file

yeah it’s about the actual PHP code itself to post to the API, not how to use the API. But this topic can be closed, I used something similar to this: