Signed-off-by: Benjamin Frueh <benjamin.frueh@gmail.com>
Update lib/public/Files/Events/BeforePropfindEvent.php
Co-authored-by: Julius Knorr <jus@bitgrid.net>
Signed-off-by: Benjamin Früh <134610227+benjaminfrueh@users.noreply.github.com>
Update lib/public/Files/Events/BeforePropfindEvent.php
Co-authored-by: Julius Knorr <jus@bitgrid.net>
Signed-off-by: Benjamin Früh <134610227+benjaminfrueh@users.noreply.github.com>
refactor: rename BeforePropfindEvent to BeforeRemotePropfindEvent
Signed-off-by: Benjamin Frueh <benjamin.frueh@gmail.com>
chore: update composer autoloader for new event class
Signed-off-by: Benjamin Frueh <benjamin.frueh@gmail.com>
Update lib/public/Files/Events/BeforeRemotePropfindEvent.php
Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
Signed-off-by: Benjamin Früh <134610227+benjaminfrueh@users.noreply.github.com>
This is faster than going back to nextcloud to download the files.
This is an opt-in setting that can be enabled by setting
use_presigned_url in the object store config.
Additionally add support for the proxy config which is needed in a
docker setup. See https://github.com/juliusknorr/nextcloud-docker-dev/pull/431
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
When computing the unencrypted file size, we need the size of the last encrypted chunk as its size is usually not the regular 8192 bits.
To avoid reading the whole file, we seek directly to that last chunk based on the expected file size. When the expected file size is smaller than the actual one, we have a logic in place to continue reading until we reach the end of the file.
In that logic, we forgot to increment the `$lastChunkNr` which is important when we later check the signature of the chunk.
This commit adds that missing increment.
Signed-off-by: Louis Chmn <louis@chmn.me>
- 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>
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>
The function was already there but called the legacy version.
So moved the implementation and migrated all usages of it.
Sadly the interface was slightly different so adjusted it to be
compatible with both legacy and the OCP one.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
- move implementation to the OCP variant that called the legacy before
- add the missing deprecation notice
- add missing parameter to align both signatures
- use OCP\Files where this method is still used
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Needed to copy the `encrypted` flag of encrypted files when those files are two level down in a moved folder.
Signed-off-by: Louis Chemineau <louis@chmn.me>