aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/ObjectStore/ObjectStoreStorage.php
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Fix reading empty files from objectstorageRoeland Jago Douma2020-09-091-0/+5
| | | | | | | | Since we try to do range requests this will fail hard. However since empty files are not that interesting to read anyways we just read from an emptry memory stream. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Run stat less often for objectstoragesRoeland Jago Douma2020-09-081-0/+10
| | | | | | | | When we want to get the permissions we now do stat at least 5 times for each entry. Which is a bit much. Especially since the permssions are all just in the database already. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Only update the filecache entry once the file has been written to S3Roeland Jago Douma2020-08-311-2/+11
| | | | | | | If we already update before we have no way to revert if the upload fails. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Don't lose filecache entry on s3 overwrite errorRoeland Jago Douma2020-08-311-5/+16
| | | | | | | If the object store errors we should not always delete the filecache entry. As this might lead to people losing access to their files. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Format code according to PSR2Christoph Wurst2020-04-101-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-101-1/+1
| | | | | | | | | | | | | | | To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use elseif instead of else ifChristoph Wurst2020-04-101-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-311-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use the short array syntax, everywhereChristoph Wurst2020-03-261-3/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Get correct mimetype on objectstoresRoeland Jago Douma2020-03-111-6/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Update license headersChristoph Wurst2019-12-051-1/+4
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* dont delete cache entries if deleting an object from object store failedRobin Appelman2019-09-251-3/+11
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Fix File#putContents(string) on ObjectStorageMarcel Klehr2019-07-171-4/+4
| | | | Signed-off-by: Marcel Klehr <mklehr@gmx.net>
* make ObjectStoreStorage::getURN publicRobin Appelman2019-05-221-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* add method to get the used object store from the storageRobin Appelman2019-05-211-0/+4
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Use CountWrapper instead of almost identical CountReadStreamRoeland Jago Douma2019-02-151-2/+2
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* upload new files in objectstore to a .part path firstRobin Appelman2018-12-121-5/+17
| | | | | | | | This prevent the object store and cache from getting out of sync when an objectstore silently fails or the php process get's killed during the upload without giving us the chance to cleanup Signed-off-by: Robin Appelman <robin@icewind.nl>
* forward object not found error in switch as dav 404Robin Appelman2018-11-191-1/+8
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* extend storage api to allow directly writing a stream to storageRobin Appelman2018-10-311-22/+46
| | | | | | | | | | | this removes the need for temporary storages with some external storage backends. The new method is added to a separate interface to maintain compatibility with storage backends implementing the storage interface directly (without inheriting common) Currently the interface is implemented for objectstorage based storages and local storage and used by webdav uploads Signed-off-by: Robin Appelman <robin@icewind.nl>