-
-
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
IFilesMetadata #40761
IFilesMetadata #40761
Conversation
3d272b9
to
59ed4a4
Compare
59ed4a4
to
0524c05
Compare
0524c05
to
9289297
Compare
376c918
to
40a04a6
Compare
40a04a6
to
6161419
Compare
6161419
to
b23a212
Compare
23ba95e
to
184157a
Compare
15cdbe8
to
c89df97
Compare
1b13b8e
to
683ef89
Compare
9ab9645
to
76faa13
Compare
76faa13
to
447618c
Compare
} | ||
|
||
if ($input->getOption('as-array')) { | ||
$output->writeln(json_encode($metadata->asArray(), JSON_PRETTY_PRINT)); |
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.
JSON_THROW_ON_ERROR
could be added for all JSON function calls.
1065e8a
to
2fc9ba3
Compare
63eb880
to
01348cb
Compare
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 I understand correctly that the metadata is only loaded on search requests atm?
I don't see any logic to trigger the loading for propfinds
|
||
/** | ||
* extra means data are not related to the main files table | ||
* | ||
* @return string | ||
* @since 28.0.0 | ||
*/ | ||
public function getExtra(): string; | ||
|
||
/** | ||
* returns if data are 'extra' or not | ||
* | ||
* @return bool | ||
* @since 28.0.0 | ||
*/ | ||
public function isExtra(): bool; | ||
|
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.
does this need to be part of the public api?
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.
it might not be necessary
GET request might wants to get their metadata, we could also imagine to use this new API to manage tags
If we don't load known indexed metadata, exceptions are thrown by https://github.com/nextcloud/3rdparty/blob/e6c45c6c0d4f92ffec621446fcc3b34584772b13/icewind/searchdav/src/DAV/SearchHandler.php#L102-L128 We could edit the code there to accept |
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
6c20880
to
e62e9e3
Compare
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.
3000 lines /o\
b9640f1
to
7205ff1
Compare
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
7205ff1
to
f497d8b
Compare
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
This PR has no version bump and therefore breaks all master setups because while the table is used, the migration to create it did not trigger. |
Follow up fix in #41351 |
#40676
Introduction
This is a feature that allow any app to store files metadata.
When a file is created or modified, an event is broadcasted so that a listener can:
fileid
tasks
How to add metadata from your own app:
lib/AppInfo/Application.php
UpdateFilesMetadata.php
How to use the (current) QueryHelper