And move it to a different table so that we don't have to pay the
storage cost when not using it (most of the times).
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
Allow to quickly query all the files from a specific mimetype like in
the ResetRenderedTexts command.
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
This work similarly to the move preview job to migrate the previews to
the new DB table and also reuse some code.
So when we are finding files in appdata/preview, try adding them to the
oc_previews table and delete them from the oc_filecache table.
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
* Simplify migration by not moving the actual files and just updating
the DB
* Don't store the storageid in the preview table as it is not needed
* Start adding tests
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
The new oc_previews table is optimized for storing previews and should
decrease significantly the space taken by previews in the filecache
table.
This attend to reuse the IObjectStore abstraction over S3/Swift/Azure
but currently only support one single bucket configuration.
Signed-off-by: Carl Schwan <carl.schwan@nextclound.com>