Code for uploading files to Nextcloud

I tried below commands.

But getting error as https not allowed.

Any suggestions?

ok with python,powershell or even curl commands

This works for upload files:

Command is:

I tried this command

C:\Users\uday>curl -k -u ukreddy:password -T “C:\Users\uday\Downloads\gif.gif” “

<?xml version="1.0" encoding="utf-8"?>

<d:error xmlns:d=“DAV:” xmlns:s=“”>
<s:message>File with name files/ukreddy/t could not be located</s:message>

There is folder “t” in my account root folder “ukreddy” can you suggest why this error comes…

THank you very much @gas85
It is working. Can you send a command for creating a folder also.

1 Like

Already answered you in other tread:

Just tested it and it works:

curl --user "user:pass" -X MKCOL 'https://DOMAIN/remote.php/webdav/Test_mkcol2'

Can you also send code for uploading complete folder also please

Do not want to be rough, but this cloud help
As you will notice there is no build-in way to upload folders, only file by file. In a github you will find different examples, e.g. this for php: