aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files_sharing/lib/Controller/ShareAPIController.php4
-rw-r--r--apps/files_sharing/lib/ResponseDefinitions.php2
-rw-r--r--apps/files_sharing/openapi.json8
3 files changed, 14 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php
index 48ba46150b3..1c642dcd952 100644
--- a/apps/files_sharing/lib/Controller/ShareAPIController.php
+++ b/apps/files_sharing/lib/Controller/ShareAPIController.php
@@ -189,6 +189,10 @@ class ShareAPIController extends OCSController {
$result['item_permissions'] = $node->getPermissions();
}
+ // See MOUNT_ROOT_PROPERTYNAME dav property
+ $result['is-mount-root'] = $node->getInternalPath() === '';
+ $result['mount-type'] = $node->getMountPoint()->getMountType();
+
$result['mimetype'] = $node->getMimetype();
$result['has_preview'] = $this->previewManager->isAvailable($node);
$result['storage_id'] = $node->getStorage()->getId();
diff --git a/apps/files_sharing/lib/ResponseDefinitions.php b/apps/files_sharing/lib/ResponseDefinitions.php
index 313cf82bd51..70dd72b64e6 100644
--- a/apps/files_sharing/lib/ResponseDefinitions.php
+++ b/apps/files_sharing/lib/ResponseDefinitions.php
@@ -39,6 +39,7 @@ namespace OCA\Files_Sharing;
* file_target: string,
* has_preview: bool,
* hide_download: 0|1,
+ * is-mount-root: bool,
* id: string,
* item_mtime: int,
* item_permissions?: int,
@@ -48,6 +49,7 @@ namespace OCA\Files_Sharing;
* label: string,
* mail_send: 0|1,
* mimetype: string,
+ * mount-type: string,
* note: string,
* parent: null,
* password?: null|string,
diff --git a/apps/files_sharing/openapi.json b/apps/files_sharing/openapi.json
index 87f36d4331f..e0f3a1397e5 100644
--- a/apps/files_sharing/openapi.json
+++ b/apps/files_sharing/openapi.json
@@ -480,6 +480,7 @@
"file_target",
"has_preview",
"hide_download",
+ "is-mount-root",
"id",
"item_mtime",
"item_size",
@@ -488,6 +489,7 @@
"label",
"mail_send",
"mimetype",
+ "mount-type",
"note",
"parent",
"path",
@@ -543,6 +545,9 @@
1
]
},
+ "is-mount-root": {
+ "type": "boolean"
+ },
"id": {
"type": "string"
},
@@ -591,6 +596,9 @@
"mimetype": {
"type": "string"
},
+ "mount-type": {
+ "type": "string"
+ },
"note": {
"type": "string"
},