Hello,
I am new to seafile, I am executing the upload of a file and I want it to be inside a folder, I indicate the path in parent_dir as / 1234 / but it gives me a permission error.
and if I execute the load in the root parent_dir / it answers me OK.
Anyone know what I need to configure to allow me to load.
Thank you
shoeper
December 14, 2020, 7:55pm
2
Does the directory exist?
The same issue.
There is a Library “qwerty”
Folder “12345_qwerty” inside the library and there is no folder “12345_ytrewq”.
3.1)
curl -H “Authorization: Token xxx” -F file=@/apps/seafile/test.txt -F parent_dir=/12345_qwerty/ h??p://localhost/seafhttp/upload-api/0fa0ce73-c4bd-4281-a213-14db6cda148f
result: {“error”: “Permission denied.”}
3.2)
curl -H “Authorization: Token xxx” -F file=@/apps/seafile/test.txt -F parent_dir=/ h??p://localhost/seafhttp/upload-api/0fa0ce73-c4bd-4281-a213-14db6cda148f
result: ok
3.3)
curl -H “Authorization: Token xxx” -F file=@/apps/seafile/test.txt -F parent_dir=/12345_ytrewq/ h??p://localhost/seafhttp/upload-api/0fa0ce73-c4bd-4281-a213-14db6cda148f
result: {“error”: “Parent dir doesn’t exist.”}
So, the issue is exactly in Folder 12345_qwerty, and I have no idea to set it up right way.
Does anybody knows a solution?
*http replaced with h??p because the forum rules
vdim
April 28, 2021, 8:58am
4
In my case option relative_path helped me. Something like this:
curl -H “Authorization: Token xxx” -F file=@/apps/seafile/test.txt -F parent_dir=/ -F relative_path= 12345_qwerty/ h??p://localhost/seafhttp/upload-api/0fa0ce73-c4bd-4281-a213-14db6cda148f
result: ok