Commit graph

368 commits

Author SHA1 Message Date
provokateurin
7ceddb3ffb
fix(IStorage): Use correct return type for stat
Signed-off-by: provokateurin <kate@provokateurin.de>
2026-02-17 06:43:16 +01:00
Carl Schwan
edd37d349b
perf(file-cache): Add mimetype filter on getFolderContents
Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-02-12 00:36:18 +01:00
Carl Schwan
9741f5f17d
perf: Allow filtering the directory content by mimetype
Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-02-12 00:35:48 +01:00
Ferdinand Thiessen
762ae4520a
fix(InMemoryFile): allow to stream read the contents
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-02-06 17:29:26 +01:00
Carl Schwan
c96ece0bcb
refactor: Add more typing
- repairs job
- database
- redis

And remove Helpertest which was unused outside of some tests.

Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2026-02-06 13:55:39 +01:00
Carl Schwan
3979c493f9
refactor: Apply second batch of comments
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2026-02-06 13:52:51 +01:00
Andy Scherzinger
08e1d9b83e
Merge pull request #58025 from nextcloud/carl/refactor-share-mountprovider
refactor(mount-provider): Refactor share mount provider
2026-02-05 11:50:40 +01:00
Julius Knorr
b933156a3a
Merge pull request #57914 from nextcloud/feat/extendable-propfind
feat(dav): allow extending propfind properties via event
2026-02-05 10:49:59 +01:00
Carl Schwan
8f81b91733
refactor(mount-provider): Refactor share mount provider
- Add more precise types
- Remove dead code

Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-02-04 12:46:14 +01:00
Benjamin Frueh
9d4b11587e feat(dav): allow extending propfind properties via event
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>
2026-02-02 11:45:10 +01:00
Carl Schwan
ef226e9ec6
Merge pull request #57826 from nextcloud/carl/setupmanager
feat(OCP): Expose setup manager to OCP
2026-01-28 21:39:15 +01:00
Carl Schwan
7100c71166
perf(metadata): Add optimized sharding for metadata deletion
Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-01-28 17:18:33 +01:00
Carl Schwan
fd3878448b
feat(filecache): Scale DB query created when deleting file from filecache
Instead of creating a CacheEntryRemovedEvent for each deleted files,
create a single CacheEntriesRemovedEvent which wrap multiple
CacheEntryRemovedEvent.

This allow listener to optimize the query they do when multiple files
are deleted at the same time (e.g. when deleting a folder).

Signed-off-by: Carl Schwan <carl.schwan@nextclound.com>
2026-01-28 16:07:57 +01:00
Carl Schwan
ae73f7aaf5
refactor(setup-manager): Use ISetupManager instead of SetupManager
Keep using the OC API in the mount manager and OC_Utils, but the rest is
now using the public API.

Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-01-27 15:19:19 +01:00
Carl Schwan
0fe01de26c
feat(OCP): Expose setup manager to OCP
It's used by a lot of apps so expose just the two methods that are most
of the time used, to prevent the apps to relly on private APIs.

Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-01-26 17:12:02 +01:00
Côme Chilliet
a467589328
Merge pull request #57573 from nextcloud/fix/fix-beforezipcreatedlistener
fix(files_sharing): Fix BeforeZipCreatedListener path handling
2026-01-20 16:08:05 +01:00
Côme Chilliet
0720e2644f
chore: fix or suppress psalm errors for BeforeZipCreatedEvent
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2026-01-20 14:32:58 +01:00
Côme Chilliet
460d63772b
fix(files_sharing): Switch back event path to be relative to user folder
This is clearly the original intent, the parameter name in ViewOnly is
 $userFolder, and the similar event for single file download uses
 paths relative to user folder as well.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2026-01-19 11:22:17 +01:00
Robin Appelman
83ac1c6030 fix: clearify meaning of getMountsForPath arguments
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-01-15 11:31:54 +01:00
Andy Scherzinger
abe5499e14
Merge pull request #57498 from nextcloud/carl/rename-imountproviderargs
refactor(files): Rename IMountProviderArgs
2026-01-14 17:50:43 +01:00
Carl Schwan
7b05c8f797
refactor(files): Rename IMountProviderArgs
It's not an interface so the I-prefix is inadequate.

Signed-off-by: Carl Schwan <carlschwan@kde.org>
2026-01-12 17:33:52 +01:00
Robin Appelman
e3551e576c
feat: add api for authoritative mount providers to update the user mounts
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-01-09 17:53:48 +01:00
Robin Appelman
198d500ac6
feat: add interface to mark mount providers as authoritative
Signed-off-by: Robin Appelman <robin@icewind.nl>
2026-01-09 17:53:42 +01:00
Robin Appelman
5c625b7a07 feat: add an option to filter what paths get checked for updates
Signed-off-by: Robin Appelman <robin@icewind.nl>
2025-12-31 12:23:04 +01:00
Salvatore Martire
6e9ba894a2 fix: add $forChildren parameter to IPartialMountProvider
Signed-off-by: Salvatore Martire <4652631+salmart-dev@users.noreply.github.com>
2025-12-29 18:06:12 +01:00
Carl Schwan
6945a030f5
refactor(OC_Helper): remove buildNotExistingFileNameForView
Move the functionality in the last place it is used OC\Files\Node\Folder

Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-12-16 10:38:29 +01:00
Salvatore Martire
fcdb28e4a3 feat: add IPartialMountProvider to support authoritative mounts
IMountProviders implementing this interface will be able to take
advantage of authoritative mounts.

The function `getMountsFromMountPoints` will receive the path that
the provider is asked to set-up and an array of IMountProviderArgs
providing information regarding the stored mount points and the
file cache data for the related root. The mount provider should verify
the validity of the mounts and return IMountPoints related to them.

Signed-off-by: Salvatore Martire <4652631+salmart-dev@users.noreply.github.com>
2025-12-10 16:05:27 +01:00
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 +01:00
Andy Scherzinger
1ef465f804
Merge pull request #56251 from nextcloud/carl/template-manager-cleanup
refactor(template-manager): Modernize template manager API
2025-12-04 17:26:53 +01:00
Kent Delante
96672e1c4d feat: emit an event when an S3 bucket is created
Signed-off-by: Kent Delante <kent.delante@proton.me>
2025-11-24 19:37:18 +08:00
Carl Schwan
9522dde7a2
feat: Add Folder::getOrCreateFolder api
Allow to remove some boilerplate and also this new function is type
safe.

Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-11-24 11:10:52 +01:00
Carl Schwan
38fd84aa6a
refactor(template-manager): Modernize template manager API
And correct openapi types for the size.

Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
2025-11-24 10:00:47 +01:00
Carl Schwan
475c84722f refactor(IPropagator): Cleanup implementation
- 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>
2025-10-08 17:15:18 +02:00
provokateurin
8d8f94b8ce
fix(files): Always return a valid mimetype
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-10-06 09:06:17 +02:00
Marcel Klehr
43be97de08 fix(FileAccess): Use one param for rewriting home dirs and excluding non-user files mounts
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-07-15 09:15:16 +02:00
Julien Veyssier
cb221c8211 fix(FileAccess*): Change the way home dir root is found, remove the excludeTrashbinMounts param of getDistinctMounts
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
2025-07-15 09:15:16 +02:00
Julien Veyssier
7e986988fe fix(FileAccess*): Adress review comments
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
2025-07-15 09:15:16 +02:00
Marcel Klehr
131125bbb7 fix(FileAccessTest): Adress review comments
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-07-15 09:15:16 +02:00
Marcel Klehr
5689af5a94 fix(FileAccess): Run cs:fix
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-07-15 09:15:16 +02:00
Marcel Klehr
d8c6f8d18e fix(FileAccess): Address review comments
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-07-15 09:15:16 +02:00
Marcel Klehr
611d83aa6a fix: Fix psalm issues
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-07-15 09:15:16 +02:00
Marcel Klehr
3eef614769 feat(IFileAccess#getMounts): Add new method to retrieve all distinct mounts
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-07-15 09:15:16 +02:00
Marcel Klehr
845b78086b feat(IFileAccess#getByAncestorInStorage): Add new method to retrieve all files in a mount
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2025-07-15 09:15:16 +02: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 +02:00
provokateurin
baeaaf09dc
chore(public): Remove unused union type for user mount events
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-07-01 10:50:28 +02:00
Ferdinand Thiessen
35a27b5fd5
fix(FilenameValidator): use _ as default replacement for invalid chars
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2025-06-18 09:44:57 +02:00
skjnldsv
e41e8de0e2 fix(dav): file drop nickname
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
2025-06-05 09:09:17 +02:00
provokateurin
40973ddde0
chore: Set correct version for new UserMount events
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-05-20 13:13:49 +02:00
Elizabeth Danzberger
5c7216f3fd
feat: only load template fields when requested
Signed-off-by: Elizabeth Danzberger <lizzy7128@tutanota.de>
2025-05-19 17:51:25 -04:00
provokateurin
6818aa9b12
feat(UserMountCache): Emit events for added, removed and updated mounts
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-05-19 13:54:51 +02:00