aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/ObjectStore/ObjectStoreStorage.php
Commit message (Collapse)AuthorAgeFilesLines
* refactor(Storage): Align all Storage constructorsrefactor/storage/constructorsprovokateurin2024-10-231-11/+11
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* refactor(Storage): Make all parameter types strong typesprovokateurin2024-10-071-33/+25
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* fix: rework move into object store to better preserve fileidsreadd-object-store-phpunitRobin Appelman2024-09-271-19/+55
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix: preserve fileid when moving from objectstore to non-objectstoreRobin Appelman2024-09-271-2/+11
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix: ensure source folder is removed from cache when moving to objectstoreRobin Appelman2024-09-271-0/+1
| | | | | | otherwise this causes confusion down the line as it's contents will be moved to the new cache Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix(Storage): Fix IStorage return typesprovokateurin2024-09-261-25/+18
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* perf: reuse cache info we already have when moving to object storeobject-store-move-dbRobin Appelman2024-09-191-2/+2
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* chore(deps): Update nextcloud/coding-standard to v1.3.1provokateurin2024-09-191-2/+2
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* fix: ensure parent folder exists when writing a file to object storageRobin Appelman2024-09-181-0/+4
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix: cleanup objectstore file_put_contentRobin Appelman2024-09-181-7/+4
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix: create intermediate directories for objectstore moveFromStorageRobin Appelman2024-09-181-0/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix: get source file before moving the cache item in objectstore moveFromStorageRobin Appelman2024-09-181-1/+5
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #47986 from cfiehe/fix_move_on_same_bucketStephan Orbaugh2024-09-171-0/+5
|\ | | | | perf(ObjectStoreStorage): Improve (slow) move on same object bucket
| * perf(ObjectStoreStorage): Improve (slow) move on same object bucketChristoph Fiehe2024-09-161-0/+5
| | | | | | | | | | | | | | | | | | This commit fixes the issue #47856. When you upload a file into a group folder and when you use a single S3 bucket as primary storage, the final move operation hangs for a long time. In the background, Nextcloud initiates a copy-delete sequence from the bucket into the bucket, with causes a lot unnecessary overhead. Nextcloud thinks that the file must be imported to another storage and does not recognize that everything is done on the same object bucket. In that case, the import step can be completely skipped, which saves time, network bandwidth and reduces the load on the object storage. The behavior improves a lot with https://github.com/nextcloud/server/pull/46013. However, there are still some put messages that are being sent to the object storage when you use an object storage as primary storage and upload files into a group folder. Co-authored-by: Kate <26026535+provokateurin@users.noreply.github.com> Signed-off-by: Christoph Fiehe <c.fiehe@eurodata.de>
* | fix(Storage): Fix method docs inheritancefix/storage/method-docs-inheritanceprovokateurin2024-09-171-4/+0
| | | | | | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* | chore: Fix psalm issues, put back private versions of getter in private ↵Côme Chilliet2024-09-161-0/+1
|/ | | | | | Storage interface Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Merge pull request #46013 from ↵Julius Härtl2024-08-261-0/+25
|\ | | | | | | | | nextcloud/obj-store-move-from-storage-preserve-fileid fix: write object to the correct urn when moving from another storage to object store
| * fix: write object to the correct urn when moving from another storage to ↵Robin Appelman2024-08-231-0/+25
| | | | | | | | | | | | object store Signed-off-by: Robin Appelman <robin@icewind.nl>
* | style: update codestyle for coding-standard 1.2.3Daniel Kesselberg2024-08-251-1/+1
|/ | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* chore: Add SPDX headerAndy Scherzinger2024-05-241-27/+4
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* fix: Apply new coding standard to all filesCôme Chilliet2024-04-021-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Revert "don't perform an explicit setup when using the file cache"Joas Schilling2024-03-071-8/+0
|
* fix: fix user folder initRobin Appelman2024-03-061-0/+8
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* chore: Migrate away from OC::$server->getLoggerCôme Chilliet2024-02-131-33/+54
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* refactor(objectstorage): cleanup typesThomas Citharel2024-02-021-4/+7
| | | | Signed-off-by: Thomas Citharel <tcit@tcit.fr>
* refactor(objectstorage): move $user property from ObjectStoreStorage class ↵Thomas Citharel2024-02-021-14/+3
| | | | | | to HomeObjectStoreStorage Signed-off-by: Thomas Citharel <tcit@tcit.fr>
* fix(ObjectStore): Make copying behavior consistent with local storageFerdinand Thiessen2023-11-171-0/+7
| | | | | | Drop file permissions on copy like we do on local storage. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* fix: Only store unencrypted_size if path should be encryptedJulius Härtl2023-09-061-0/+2
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* use source cache when listing folder during recursive copyRobin Appelman2023-06-191-5/+6
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* don't always check if we need to setup the object store rootRobin Appelman2023-05-231-6/+18
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* repair -1 folder sizes for object store background scanRobin Appelman2023-05-101-2/+2
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #32314 from nextcloud/object-mkdir-loggingSimon L2023-04-171-0/+3
|\ | | | | additional logging when mkdir fails for object storage
| * additional logging when mkdir fails for object storageRobin Appelman2023-04-051-0/+3
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | improve objectstore rmdir handlingRobin Appelman2023-04-031-36/+50
|/ | | | | | | | remove folder entries as they are cleared instead of in one go afterwards otherwise they stick around if some of the child entries can't be removed Signed-off-by: Robin Appelman <robin@icewind.nl>
* feat(s3): Use multipart upload for chunked uploadingJulius Härtl2023-03-081-2/+74
| | | | | | This allows to stream file chunks directly to S3 during upload. Signed-off-by: Julius Härtl <jus@bitgrid.net>
* composer run cs:fixCôme Chilliet2023-01-201-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* compare cached filesize on downloadMaxence Lange2022-12-011-2/+12
| | | Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
* allow disabling object store write checkRobin Appelman2022-10-261-1/+7
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Rename file1 and file2 to source and target in Storage abstractionCarl Schwan2022-10-181-5/+5
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Cleanup temporary files after finishing the write to object storageJulius Härtl2022-06-021-0/+2
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Fix permissions when copying from ObjectStorageCarl Schwan2021-10-281-0/+8
| | | | | | | | | | | | | | | | | | | | | | Make sure that when a user copy a file from a directory they don't have all permissions to a directory where they have more permissions, the permissions are correctly set to the one from the parent taget folder. This was caused by the ObjectStoreStorage::copyFromStorage using the jailed storage and cache entry instead of the unjailed one like other storages (the local one). Steps to reproduce + Use object storage + Create a groupfolder with one group having full permission and another one who can just read files. + With an user who is in the second group, copy a file from the groupfolder to the home folder of this user. + The file in the home folder of the user will be read only and can't be deleted even though it is in their home folder and they are the owner. In oc_filecache, the permissions stored for this file are 1 (READ) Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Reset checksum when writing files to object storeJulius Härtl2021-06-211-0/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-1/+0
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* explicitly close source stream on object store upload even if count wrapper ↵Robin Appelman2021-04-291-0/+3
| | | | | | isn't needed Signed-off-by: Robin Appelman <robin@icewind.nl>
* set mimetype for objects uploaded to object storagesRobin Appelman2021-04-211-2/+2
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* use returned file id for object store copyRobin Appelman2021-03-121-6/+6
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* apply object store copy optimization when 'cross storage' copy is within the ↵Robin Appelman2021-03-091-0/+14
| | | | | | same object store Signed-off-by: Robin Appelman <robin@icewind.nl>
* Update license headersChristoph Wurst2020-12-301-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* storage: update IStorage#file_put_contents docs to match usageTigran Mkrtchyan2020-12-211-2/+2
| | | | | | | The current phpdoc of IStorage#file_put_contents doesnt corresponds to it's actual usage in code, e.g. Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
* use in objectstore copyRobin Appelman2020-11-241-2/+62
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>