-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Return privatelink via DAV #29021
Return privatelink via DAV #29021
Conversation
Example request/response:Request: <?xml version='1.0' encoding='utf-8'?>
<propfind xmlns="DAV:">
<prop>
<privatelink xmlns="http://owncloud.org/ns"/>
</prop>
</propfind> Response: <?xml version='1.0' encoding='UTF-8'?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns"
xmlns:cal="urn:ietf:params:xml:ns:caldav" xmlns:cs="http://calendarserver.org/ns/"
xmlns:card="urn:ietf:params:xml:ns:carddav" xmlns:oc="http://owncloud.org/ns">
<d:response>
<d:href>/remote.php/dav/files/admin/foo/zubulski.txt</d:href>
<d:propstat>
<d:prop>
<oc:privatelink>http://localhost:9090/index.php/f/22</oc:privatelink>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
</d:response>
</d:multistatus> Capabilities{
"ocs":{
"meta":{
"status":"ok",
"statuscode":100,
"message":"OK",
"totalitems":"",
"itemsperpage":""
},
"data":{
"version":{
"major":10,
"minor":0,
"micro":3,
"string":"10.0.3 beta",
"edition":"Community"
},
"capabilities":{
"core":{
"pollinterval":60,
"webdav-root":"remote.php/webdav",
"status":{
"installed":"true",
"maintenance":"false",
"needsDbUpgrade":"false",
"version":"10.0.3.0",
"versionstring":"10.0.3 beta",
"edition":"Community",
"productname":"ownCloud"
}
},
"dav":{
"chunking":"1.0"
},
"files_sharing":{
"api_enabled":true,
"public":{
"enabled":true,
"password":{
"enforced":false
},
"expire_date":{
"enabled":false
},
"send_mail":false,
"upload":true,
"multiple":true,
"supports_upload_only":true
},
"user":{
"send_mail":false
},
"resharing":true,
"group_sharing":true,
"default_permissions":31,
"federation":{
"outgoing":true,
"incoming":true
}
},
"checksums":{
"supportedTypes":[
"SHA1"
],
"preferredUploadType":"SHA1"
},
"files":{
"privateLinks":true, // <----- New capability
"bigfilechunking":true,
"blacklisted_files":[
".htaccess"
],
"undelete":true,
"versioning":true
}
}
}
}
} |
Looks good from a client point of view. The private link returned by the new DAV property works and respects However, the private link displayed in the file browser web ui did not respect overwritehost in my tests! (seems orthogonal to this PR) |
* The sharing ui does a propfind anyway: use that to query the new property as well! * For the socket api, asynchronously query the server for the right url when an action that needs it is triggered. The old, manually generated URL will be used as fallback in case the server doesn't support the new property or the property can't be retrieved for some reason. Depends on owncloud/core#29021
I think the one from the web UI is based on whatever URL is displayed in the web browser / UI, so if that domain does not match overwritehost, then it would not match. In a normal setup I'd expect both to be the same. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@IljaN please backport to stable10 |
* The sharing ui does a propfind anyway: use that to query the new property as well! * For the socket api, asynchronously query the server for the right url when an action that needs it is triggered. The old, manually generated URL will be used as fallback in case the server doesn't support the new property or the property can't be retrieved for some reason. Depends on owncloud/core#29021
* The sharing ui does a propfind anyway: use that to query the new property as well! * For the socket api, asynchronously query the server for the right url when an action that needs it is triggered. The old, manually generated URL will be used as fallback in case the server doesn't support the new property or the property can't be retrieved for some reason. Depends on owncloud/core#29021
* The sharing ui does a propfind anyway: use that to query the new property as well! * For the socket api, asynchronously query the server for the right url when an action that needs it is triggered. The old, manually generated URL will be used as fallback in case the server doesn't support the new property or the property can't be retrieved for some reason. Depends on owncloud/core#29021
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. |
Description
Possibility to retrieve privatelinks via dav, to facilitate better integration with clients
Related Issue
#28984
How Has This Been Tested?
Types of changes
Checklist: