Create a share and rename it

Hello all,

I’m using the OCS Share API to share folders with a specific user.

The problem is the folder is always the same “tech_spec” and is located inside each client folder we have. So the user “sees” “tech_spec” shares but doesn’t know for which client.

I see that the user can rename safely a share and it doesn’t modify the original name of the folder.

My question is it possible to create a share AND change the share name for that user ?

Thank you!

lamaZZi

You could try using the Share Renamer app, at least for future links.

https://apps.nextcloud.com/apps/sharerenamer

Otherwise, you can use an external service such as YOURLS, Kutt or Polr to have this functionality.

http://yourls.org/

https://kutt.it/

https://docs.polrproject.org/en/latest/

It’s share for a user not through a public link.

My question concerns the folders list the registered user sees when he checks its shares.

Obviously I can use WebDAV to rename a share.

I’ve successfully done it:

curl -k -u 'user1':'pass' -X MOVE --header 'Destination:https://localhost/remote.php/dav/files/user1/Shares/share_rename' 'https://localhost/remote.php/dav/files/user1/Shares/share'

However I’m enable to do it from my admin account:

curl -k -u 'admin':'pass' -X MOVE --header 'Destination:https://localhost/remote.php/dav/files/user1/Shares/share_rename' 'https://localhost/remote.php/dav/files/user1/Shares/share'

I suppose there is no way around it ?