aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/ObjectStore
Commit message (Collapse)AuthorAgeFilesLines
...
* | Fix getDirectoryContent implementation for Jail wrapperRobin Appelman2020-04-301-2/+2
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Run the cs fixer for green ciRoeland Jago Douma2020-04-301-6/+0
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Merge pull request #18883 from adrb/optimize_swift_14116Roeland Jago Douma2020-04-302-18/+48
|\ \ | | | | | | Optimize Openstack Swift files download
| * | It's a fix for issue #14116,Adrian Brzezinski2020-04-272-18/+48
| |/ | | | | | | | | | | | | | | | | | | Improves efficiency when downloading files from Swift storage. Before, files were downloaded and then pushed back to user. That behaevior causes all kinds of performance problems. Now, files are streamed directly to user. Signed-off-by: Adrian Brzezinski <adrian.brzezinski@eo.pl>
* / Update license headers for 19Christoph Wurst2020-04-294-0/+5
|/ | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add method to storage backends to get directory content with metadataRobin Appelman2020-04-201-1/+1
| | | | | | | | | | | | | | | | | Currently you need to use `opendir` and then call `getMetadata` for every file, which adds overhead because most storage backends already get the metadata when doing the `opendir`. While storagebackends can (and do) use caching to relief this problem, this adds cache invalidation dificulties and only a limited number of items are generally cached (to prevent memory usage exploding when scanning large storages) With this new methods storage backends can use the child metadata they got from listing the folder to return metadata without having to keep seperate caches. Signed-off-by: Robin Appelman <robin@icewind.nl>
* Fix issues with Keystone auth v3 in files_external appJulien Lutran2020-04-151-0/+4
| | | | Signed-off-by: Julien Lutran <julien.lutran@corp.ovh.com>
* Format code according to PSR2Christoph Wurst2020-04-101-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add visibility to all constantsChristoph Wurst2020-04-101-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add visibility to all methods and position of static keywordChristoph Wurst2020-04-102-7/+7
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-104-14/+6
| | | | | | | | | | | | | | | 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-102-4/+4
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Remove trailing and in between spacesChristoph Wurst2020-04-091-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Unify function spacing to PSR2 recommendationChristoph Wurst2020-04-091-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use exactly one empty line after the namespace declarationChristoph Wurst2020-04-092-1/+1
| | | | | | For PSR2 Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* make seekable s3 stream genericRobin Appelman2020-04-012-150/+25
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Enable fseek for files in S3 storageLukas Stabe2020-04-012-19/+147
| | | | Signed-off-by: Lukas Stabe <lukas@stabe.de>
* Update the license headers for Nextcloud 19Christoph Wurst2020-03-313-0/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use the short array syntax, everywhereChristoph Wurst2020-03-263-6/+6
| | | | 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-0513-15/+60
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Some php-cs fixesRoeland Jago Douma2019-11-224-6/+7
| | | | | | | | | | | * Order the imports * No leading slash on imports * Empty line before namespace * One line per import * Empty after imports * Emmpty line at bottom of file Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* 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 typo in commentMorris Jobke2019-07-291-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Fix File#putContents(string) on ObjectStorageMarcel Klehr2019-07-171-4/+4
| | | | Signed-off-by: Marcel Klehr <mklehr@gmx.net>
* Use HTTP1.1 to read S3 objectsRoeland Jago Douma2019-07-101-0/+1
| | | | | | | | Some of the READs otherwise use HTTP/1.0 which is not always supported by all backends. HTTP/1.1 is there since 1999 way longer than S3 so safe to assume it is always there IMO. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Merge pull request #15715 from nextcloud/s3-bucket-nameMorris Jobke2019-05-241-1/+4
|\ | | | | Allow other code to use the s3 client from object store
| * add method to get bucket name from s3 storageRobin Appelman2019-05-241-1/+4
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | 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>
* Always use a temp file for swift writesRoeland Jago Douma2019-04-181-8/+3
| | | | | | | | Apparently the if statement doesn't work in all cases (even if I could not reproduce it). So for the time being we will just not directly stream to swift. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Merge pull request #14424 from nextcloud/fix/13554/swift_to_tmpRoeland Jago Douma2019-03-061-1/+10
|\ | | | | Use a tmp file for swift writes
| * Use a tmp file for swift writesRoeland Jago Douma2019-03-041-1/+10
| | | | | | | | | | | | Else this leads to a seekable stream error with chunked uploads Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Merge pull request #14175 from skydiablo/masterMorris Jobke2019-03-051-0/+1
|\ \ | |/ |/| Fix ObjectStorage expired token (v3)
| * Update SwiftFactory.phpVolker2019-02-131-0/+1
| | | | | | Auth-Service (in explizit v3) will recheck the cached-token and will end in an "token expired exception".
* | Merge pull request #14254 from sparrowjack63/masterRoeland Jago Douma2019-03-011-4/+7
|\ \ | | | | | | Dont check Bucket Name in Nextcloud
| * | Bucket name - Alert in debug modeS. Cat2019-03-011-1/+1
| | | | | | | | | | | | | | | | | | Alert in debug mode only when trying to mount non compatible DNS bucket name (in order to not flood the logs) Signed-off-by: Sébastien Cat <sebastien.cat@inra.fr>
| * | Correct code indentS. Cat2019-03-011-5/+5
| | | | | | | | | | | | | | | | | | Just correct code indent. Signed-off-by: Sébastien Cat <sebastien.cat@inra.fr>
| * | Warning on S3 not compatible DNS bucket nameS. Cat2019-03-011-4/+11
| | | | | | | | | | | | | | | | | | The new created bucket should respect the DNS compatibility, nevertheless, Nextcloud should accept to mount "old created" buckets that does not respect DNS compatibility (Backward compatibility, or compatibility with CEPH). Signed-off-by: Sébastien Cat <sebastien.cat@inra.fr>
| * | Dont check Bucket Name in NextcloudSebastien Cat2019-03-011-4/+0
| |/ | | | | | | | | Signed-off-by: Sebastien Cat <sparrow.jack63@gmail.com> Signed-off-by: Sébastien Cat <sebastien.cat@inra.fr>
* | Merge pull request #14210 from nextcloud/fix/14192/fix_empty_uploadsRoeland Jago Douma2019-02-181-2/+23
|\ \ | | | | | | Fix empty file uploads to S3 (and other streaming storages)
| * | Fix empty file uploads to S3Roeland Jago Douma2019-02-151-2/+23
| |/ | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* / Use CountWrapper instead of almost identical CountReadStreamRoeland Jago Douma2019-02-151-2/+2
|/ | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix: Check if `$this->params['user']` is an arrayWilliam Pain2019-02-051-1/+1
| | | | Signed-off-by: William Pain <pain.william@gmail.com>
* always use multipart uploader for s3 uploadsRobin Appelman2019-01-281-2/+5
| | | | | | the multipart uploader handles non seekable streams while `upload` does not Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #13032 from nextcloud/objectstore-write-existsMorris Jobke2019-01-145-5/+40
|\ | | | | upload new files in objectstore to a .part path first
| * 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>
| * Add objectExists to objectstore interfaceRobin Appelman2018-12-124-0/+23
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Cache tokens when using swift's v2 authenticationRobin Appelman2019-01-132-17/+86
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Add PHPDoc for thrown exceptionMorris Jobke2018-11-191-0/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>