Strange share_links API behavior

Hi,

I’m trying to use the share links API to generate share links with cloud edit enabled, using Seafile 12.0.7 Community Edition.

I got a strange behavior:

  • If there is no share link on the file, I successfully get a share link with cloud edit enabled, in this case, everything is ok.
  • but if there is already a share link, even if this share has not the same permissions as requested via the API, I get a 400 error with this message: Share link already exists.

This is not consistent with the seahub UI, where it is possible to create multiple share links, with different permissions, without any problem.

May be it’s a bug of the API?

Or there am I missing something?

Hi,
The API displayed in the docs is for creating single share-links。 For creating multiple share-links,you may post request the endpoint of /api/v2.1/multi-share-links/, which will be added in the documents later.

Hi,

Oh great, thank you for the tip, it works!