Fix https://github.com/nextcloud/server/issues/56077
This commit makes the configuration settings 'request_checksum_calculation' and 'response_checksum_validation' of the S3Client from the AWS SDK for PHP configurable.
Signed-off-by: Fiehe Christoph <c.fiehe@eurodata.de>
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Fix "Typed property OC\\Files\\Cache\\Cache::$storage must not be accessed before initialization"
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
The quota is now decremented by the actual number of bytes written ($written) rather than the intended size.
This ensures quota tracking stays accurate even if fwrite writes fewer (or more - i.e. from underlying buffering/etc) bytes than requested.
Signed-off-by: Josh <josh.t.richards@gmail.com>
to avoid 'object::%' to be considered as a column
(`la colonne \\u00ab object::% \\u00bb n'existe pas` on PG)
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
- Add missing type hinting
- Use only public methods from IStorage instead of relying on internal
\OC\Storage methods
- Refactor HomePropagator to use ignore argument from Propagator instead
of reimplementing the same logic.
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
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>
It's in OC and should not be used at all. Marking it as internal will
at least prevent new code to use it.
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>
AppData caches folder objects, and several places get them to delete
them, so afterwards if the folder gets reused in the same session an
error happens. This is the case in unit tests with user avatars.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
If encryption got disabled, copying should set encrypted to 0 for the
new unencrypted copy. For instance when using encryption:decrypt-all
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This fixes the issue that some methods will not allow uploading files
because they still require the deprecated config option to be used.
So instead we need to use the validator introduced in v30.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
UniqueConstraintViolationException is no longer throw directly but
instead is now wrapped inside a \OCP\DB\Exception. So check the
exception reason.
Signed-off-by: Carl Schwan <carl.schwan@nextclound.com>