Unable to upload a file

I’m trying to upload a file:

curl -X PUT -u "my_username:pass123" "https://nextcloud.my_website.com/remote.php/webdav/Shared/dir1/" --data-binary @"/Users/user1/test1.png"

Error:

  <?xml version="1.0" encoding="utf-8"?>
  <d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
    <s:exception>Sabre\DAV\Exception\Conflict</s:exception>
    <s:message>PUT is not allowed on non-files.</s:message>
  </d:error>

Why?

The credentials I’m using are the ones I use for login in the browser.