title: Nextcloud: Batch folder share for upload only
body: <p>i want to create folders in my Nextcloud for many users.
  The users should only be able to upload files.
  That's why i wanted to write a script for that.
  Here i found a <a href="https://github.com/Gsocol/pyncclient/blob/master/nextcloud_client/nextcloud_client.py" rel="nofollow noreferrer">library for Python</a> (like pyncclient) to create shares.
  To test the script i first create folders named by timestamp.
  With this folders i'm able to create shares, but the permission option is not working for me. I always only get read-only shares.
  Could someone please help me how to do that right?</p>
  <p>My script:</p>
  <pre><code>import nextcloud_client
  import time
  timestr = time.strftime(&quot;%Y%m%d-%H%M%S&quot;)
  nc = nextcloud_client.Client('http://domain.tld/nextcloud')
  nc.login('user', 'password')
  nc.mkdir(timestr)
  link_info = nc.share_file_with_link(timestr, perms=4)
  print(&quot;Here is your link: &quot; + link_info.get_link())
  </code></pre>
  <p>Maybe there is a better library for that?
  Thanks.</p>
  <p>Edit:
  I guess i found a workaround for the problem. I only need to update the permissions after i created the share:</p>
  <pre><code>nc.update_share(link_info.get_id(),perms=4)
  </code></pre>