Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API public-shares autom. overwritten #22754

Closed
xerc opened this issue Mar 1, 2016 · 3 comments
Closed

API public-shares autom. overwritten #22754

xerc opened this issue Mar 1, 2016 · 3 comments

Comments

@xerc
Copy link

xerc commented Mar 1, 2016

  1. create a share via API
  2. create a share via API with another expireDate
    -> the first is overwritten //> how to prevent this?

ToDo: i prefer different URLs/TOKENs to share (public) folders

$ curl "localhost/ocs/v1.php/apps/files_sharing/api/v1/shares" -k -u USER:PASS -X POST --data "shareType=3&expireDate=2016-03-03&path=bilderdatenbank"

  <id>10</id>
  <url>localhost/index.php/s/ji5kd12P1wrjvNU</url>
  <token>ji5kd12P1wrjvNU</token>
  <permissions>1</permissions>
  <expiration>2016-03-03 00:00:00</expiration>

$ curl "localhost/ocs/v1.php/apps/files_sharing/api/v1/shares" -k -u USER:PASS -X POST --data "shareType=3&expireDate=2016-03-04&path=bilderdatenbank"

  <id>11</id>
  <url>localhost/index.php/s/ji5kd12P1wrjvNU</url>
  <token>ji5kd12P1wrjvNU</token>
  <permissions>1</permissions>
  <expiration>2016-03-04 00:00:00</expiration>

$ curl "localhost/ocs/v1.php/apps/files_sharing/api/v1/shares" -k -u USER:PASS

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message/>
 </meta>
 <data>
  <element>
   <id>11</id>
   <item_type>folder</item_type>
   <item_source>464</item_source>
   <parent/>
   <share_type>3</share_type>
   <share_with/>
   <file_source>464</file_source>
   <file_target>/bilderdatenbank</file_target>
   <path>/bilderdatenbank</path>
   <permissions>1</permissions>
   <stime>1456844827</stime>
   <expiration>2016-03-04 00:00:00</expiration>
   <token>ji5kd12P1wrjvNU</token>
   <storage>4</storage>
   <mail_send>0</mail_send>
   <uid_owner>USER</uid_owner>
   <storage_id>home::USER</storage_id>
   <file_parent>45</file_parent>
   <share_with_displayname/>
   <displayname_owner>USER</displayname_owner>
   <url>localhost/index.php/s/ji5kd12P1wrjvNU</url>
  </element>
 </data>
</ocs>
@PVince81
Copy link
Contributor

PVince81 commented Mar 1, 2016

Please state your ownCloud version. If you're using git, please try pulling as something similar was fixed recently.

@rullzer
Copy link
Contributor

rullzer commented Mar 1, 2016

Currently we allow only 1 link share per file/folder. But we want to change that eventually: #22327

@rullzer rullzer closed this as completed Mar 1, 2016
@lock
Copy link

lock bot commented Aug 6, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants