Commit Graph

102 Commits (71c2e941236b70b886cf49ab15f77eb58daaa380)

Author SHA1 Message Date
Carl Schwan b6313f68d3
perf(s3): Expose pre-signed urls for S3
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>
2025-12-09 11:21:35 +07:00
Robin Appelman 17104bf3a0
chore: better type hints for `getAvailability`
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-11-06 20:09:17 +07:00
Ferdinand Thiessen 660f3f6fd1
refactor: use logical `&&` `||` instead of weak `and` `or` operators
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-09-27 23:02:18 +07:00
Ferdinand Thiessen 5981b7eb51
chore: apply new CSFixer rules
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>

# Conflicts:
#	apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
2025-07-01 16:26:50 +07:00
Ferdinand Thiessen 01db539d0a
chore: move streamCopy implementation from `OC_Helper` to `OCP\Files`
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>
2025-05-16 13:03:05 +07:00
Robin Appelman 41c53648ad
Merge pull request #49262 from nextcloud/move-from-encryption-no-opt
fix: don't do same-storage move optimization with encryption wrappers
2024-12-05 17:42:47 +07:00
Git'Fellow 60d956f39f refactor(storage): Code adjustements and simplifications
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
2024-11-21 10:02:00 +07:00
Git'Fellow 8755bf1815 fix(storage): Try to delete existing target
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>

Add same logic to common storage
2024-11-20 09:42:33 +07:00
Robin Appelman 0bc478de2c
fix: don't do same-storage move optimization with encryption wrappers
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-11-13 18:47:13 +07:00
provokateurin 0de4843b73 refactor(Storage): Align all Storage constructors
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-10-23 13:24:18 +07:00
provokateurin f28e74b7a8
refactor(Storage): Make all parameter types strong types
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-10-07 15:00:05 +07:00
Kate 26762172f5
Merge pull request #48454 from nextcloud/fix/storage/get-directory-content-return-type 2024-10-01 16:22:16 +07:00
provokateurin e1998b6b6c
fix(Storage): Fix getDirectoryContent() return type
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-30 16:49:27 +07:00
Robin Appelman 888d06dff9
fix: preserve fileid when moving from objectstore to non-objectstore
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-09-27 14:45:42 +07:00
provokateurin 7cdccd058f
fix(Storage): Fix IStorage return types
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-26 18:13:03 +07:00
Côme Chilliet 94b0a0e863 fix: Move storage constructor to specific interface
That allows Wrappers to use DI and not care about the constructor

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-09-23 09:46:44 +07:00
provokateurin d2d1e3284d
fix(Storage): Fix method docs inheritance
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-17 10:20:38 +07:00
provokateurin 8ca6fcace7
fix(Storage): Document getOwner() can return false
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-17 10:10:50 +07:00
Côme Chilliet e7ac9bb2d8
chore: Check storage is an instance of the correct class instead of psalm-suppress
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-09-16 18:11:39 +07:00
Côme Chilliet ed0ac284e3
chore: Remove deprecated Storage::search method instead of moving it to IStorage
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-09-16 18:11:38 +07:00
Côme Chilliet 5d01e0a73c
chore: psalm-suppress legacy code weirdness
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-09-16 18:11:38 +07:00
Côme Chilliet 492e6997d8
chore: Fix psalm issues, put back private versions of getter in private Storage interface
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-09-16 18:11:38 +07:00
provokateurin 70fa51f042
fix(files): Never return a null ETag in DAV
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-09 10:30:33 +07:00
Ferdinand Thiessen 17f011f7c5 fix: Also validate parent path in `verifyPath`
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-08-28 17:22:20 +07:00
Daniel Kesselberg af6de04e9e
style: update codestyle for coding-standard 1.2.3
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2024-08-25 19:34:58 +07:00
John Molakvoæ d35c4eb911
Merge branch 'master' into jr-readdir-false-false
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
2024-08-16 10:53:50 +07:00
Ferdinand Thiessen 69341e4306
refactor: Migrate filename validation logic from `Storage` to `FilenameValidator`
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-07-16 12:49:09 +07:00
Andy Scherzinger dae7c159f7
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-24 13:11:22 +07:00
Julius Härtl 4910e7e231
fix: Pass the mountpoint target user to storages without owner
Storages that do not have a dedicated owner (e.g. groupfolders, external
storages) currently always assume the current session user as the owner.
This leads to several issues when there is no user session but a node is
obtained through a user folder.

In order to have the correct user available we need to pass the user
that is used to setup a mountpoint along to the storage layer as we
generally assume that an owner is available for those.

Signed-off-by: Julius Härtl <jus@bitgrid.net>
2024-04-09 09:04:24 +07:00
Côme Chilliet ec5133b739 fix: Apply new coding standard to all files
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-04-02 14:16:21 +07:00
Ferdinand Thiessen 27642d3e6d fix: Enforce forbidden filename characters on backend
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2024-02-28 22:19:25 +07:00
Julius Härtl 22eab7ba36
fix: Throw instead of yielding nothing when listing local directories
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2024-02-23 16:08:09 +07:00
Robin Appelman e9d97a568f
use OCP\Server
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-02-12 16:39:00 +07:00
Robin Appelman 7a91abb439 improve di performance for cache
Signed-off-by: Robin Appelman <robin@icewind.nl>
2024-02-09 13:28:30 +07:00
Hamid Dehnavi ea06cf2f39 Convert isset ternary to null coalescing operator
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
2023-09-28 17:44:19 +07:00
Josh Richards e7cbaf3ee3 Clean-up some remaining readdir calls with undesirable false evaluation potential
Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
2023-06-24 15:37:06 +07:00
Faraz Samapoor e7cc7653b8 Refactors "strpos" calls in lib/private to improve code readability.
Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
2023-05-15 15:17:19 +07:00
Julius Härtl 11c5bc6a2a
fix: Wrap filesystem LockedExceptions for holding the readable path
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-05-02 19:40:27 +07:00
Côme Chilliet b294edad80
Merge branch 'master' into enh/type-iconfig-getter-calls
Signed-off-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
2023-04-20 16:52:38 +07:00
Robin Appelman 570b64aafc
handle not being able to write file for notify self-test
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-04-06 11:52:22 +07:00
Côme Chilliet 426c0341ff
Use typed version of IConfig::getSystemValue as much as possible
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-05 12:50:08 +07:00
Côme Chilliet 1740311283
Adapt types of subclasses
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-01 14:20:24 +07:00
Côme Chilliet 308fcf4526
Respect OCP interface in private classes
Because the parameter type was moved to phpdoc it needs to be removed
 from implementations

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-02-07 11:23:35 +07:00
Côme Chilliet d9dbed9105
Fix psalm errors related to filesizes
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-02-07 11:23:29 +07:00
Côme Chilliet ff776a90b1
Strong type filesize related methods to ease 32bits problem findings
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-02-07 11:23:28 +07:00
Côme Chilliet f5c361cf44
composer run cs:fix
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-20 11:45:08 +07:00
Carl Schwan a5ea677370 Rename file1 and file2 to source and target in Storage abstraction
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-18 17:21:47 +07:00
blizzz 2e10378052
Merge pull request #31475 from nextcloud/kofemann-patch-1
files: close open directory file descriptor on error path
2022-06-21 18:44:05 +07:00
Côme Chilliet 23f7a37c03
Remove ILogger usages in lib/private/Files/Storage
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-04-26 16:52:53 +07:00
Robin Appelman 84f464550a
some file scanner performance improvements
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-03-17 22:21:16 +07:00