I am trying to make my ruby application upload a zip file to a file drop folder in my nextcloud, but I only get 405 answers from nextcloud. Unfortunately, I was unable to find any documentation on how to do this or how such a post request is supposed to look like.
Can someone please hint me to what exact url and headers to use?
The only thing I found on that topic is this little curl script, but it did not help making it work (and it looks a bit outdated).
Thank you a lot for pointing me to the right direction. It seems like I should be using a PUT request instead of a POST request.
Now I can get some results when testing with curl, though the upload is not successful yet.
The API documentation states that all requests need to provide authentication information, either as a Basic Auth header or by passing a set of valid session cookies. But this somehow defeats the purpose of having a public upload (file drop) page which does not need an account.
If I give curl test:test for user:password, just so to make it send an auth header, I get the error “No public access to this resource., Username or password was incorrect”.
As mentioned above, I can’t help you with nodejs as I’ve never used it.
Get some guidance from the official API documentation and test your queries with curl.
I don’t know how you are expecting to use a file upload link. The api docs state (as also mentioned a few posts above) that you have to use the PUT http method to upload a file, so I’d rather try this or this.