-
-
Notifications
You must be signed in to change notification settings - Fork 4.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
expose gps data via webdav #39694
expose gps data via webdav #39694
Conversation
/backport to stable-27.1 |
|
||
$propFind->handle(self::FILE_METADATA_GPS, function () use ($node) { | ||
if (!str_starts_with($node->getFileInfo()->getMimetype(), 'image')) { | ||
return json_encode((object)[], JSON_THROW_ON_ERROR); |
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.
Maybe just:
return json_encode((object)[], JSON_THROW_ON_ERROR); | |
return '{}'; |
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.
I guess it is a one-to-one replication of the code for files-metadata-size
, so I would keep it as-is.
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.
Do not forget to add the prop to the documentation here:
@tobiasKaminsky I created the documentation PR, while it is lacking the examples, maybe you can add them? nextcloud/documentation#10957 |
please also adjust the bulk-loading logic from server/apps/dav/lib/Connector/Sabre/FilesPlugin.php Lines 469 to 478 in 1a6709c
|
Signed-off-by: Robin Appelman <[email protected]>
Added the pre-loading and de-duplicated some logic |
$childrenForMeta = array_filter($children, function (INode $child) use ($relevantMimeType) { | ||
return $child instanceof File && $child->getFileInfo()->getMimePart() === $relevantMimeType; | ||
}); | ||
$fileIds = array_map(function (File $child) { |
Check notice
Code scanning / Psalm
MissingClosureReturnType Note
The backport to stable-27.1 failed. Please do this backport manually. # Switch to the target branch and update it
git checkout stable-27.1
git pull origin stable-27.1
# Create the new backport branch
git checkout -b fix/foo-stable-27.1
# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts. Resolve them.
git cherry-pick abc123
# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable-27.1 More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport |
/backport to stable27 |
Checklist