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

[OC6Beta2] Share API: Cannot add share #5729

Closed
ser72 opened this issue Nov 6, 2013 · 10 comments
Closed

[OC6Beta2] Share API: Cannot add share #5729

ser72 opened this issue Nov 6, 2013 · 10 comments

Comments

@ser72
Copy link

ser72 commented Nov 6, 2013

Expected Results
Ability to add share

Actual Results
Error message

Steps
2 users: yogi and ser72_oc6

Yogi has files as such:

capture

Use share API to share test/Lab.txt with ser72_oc6 via firefox API Poster:

capture1

Get error stating "Please specify a file or folder path"

As you can see in the parameter list, the path is listed as test/Lab.txt, which in the above screen shot you can see exists

{"installed":"true","version":"6.0.0.3","versionstring":"6.0 beta 2","edition":""}

Ubuntu

@ser72
Copy link
Author

ser72 commented Nov 6, 2013

@schiesbn

@Skunnyk
Copy link

Skunnyk commented Nov 7, 2013

Can you try with curl, something like :
curl "http://ip/ocs/v1.php/apps/files_sharing/api/v1/shares" -k -u user:password -X POST --data "path=test/Lab.txt&shareType=3" . It works for me on oc6beta2/beta3

@ser72
Copy link
Author

ser72 commented Nov 7, 2013

@Skunnyk That worked. Thanks. Then how would you share with a user?

@Skunnyk
Copy link

Skunnyk commented Nov 7, 2013

@ser72 You can look at https://github.com/owncloud/documentation/blob/stable5/developer_manual/core/ocs-share-api.rst .
Something like :
curl "http://ip/ocs/v1.php/apps/files_sharing/api/v1/shares" -k -u user:password -X POST --data "path=test/Lab.txt&shareType=0&shareWith=yogi" should works :)
Some examples here too : http://blog.alteroot.org/articles/2013-11-02/play-with-owncloud-share-api.html

@ser72
Copy link
Author

ser72 commented Nov 7, 2013

@Skunnyk : That worked. Great. Thanks. THe thing that confused me is in the doc the shareWith is listed as expecting an integer not a string. So I didn't quite know how to proceed with that.

@ser72
Copy link
Author

ser72 commented Nov 8, 2013

CURL works. Still need to get this working with Poster or the likes. Configure as above get error message

@DeepDiver1975
Copy link
Member

@ser72 I have no clue about POSTER - let's see what I can do ....

@karlitschek
Copy link
Contributor

If it works with CURL then it's most likely not an ownCloud bug.

@Skunnyk
Copy link

Skunnyk commented Nov 8, 2013

@ser72 Don't forget to clic to "Body from parameters" in "Content to send" tab in Poster to use Parameters. It's not an owncloud issue :)

@ser72
Copy link
Author

ser72 commented Nov 8, 2013

@Skunnyk That did it. Thanks

@ser72 ser72 closed this as completed Nov 8, 2013
@lock lock bot locked as resolved and limited conversation to collaborators Aug 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants