summaryrefslogtreecommitdiffstats
path: root/lib/private/Files/ObjectStore
Commit message (Collapse)AuthorAgeFilesLines
* Resolves #19790, Provides Support for IAM CredentialsStephen Cuppett2020-08-201-6/+38
| | | | | | | | | | | Includes support for either leveraging environment variables passed to the PHP runtime or IAM instance profile present on the host being used. The default and first choice is still the parameter file as documented. See also: https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/guide_credentials_provider.html#chaining-providers Signed-off-by: Stephen Cuppett <steve@cuppett.com>
* Use matching parameter names form interfaces and implementationsMorris Jobke2020-08-191-1/+1
| | | | | | Found by Psalm 3.14.1 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Distribute preview folders in appdata in multibucket setup to multiple bucketsMorris Jobke2020-08-061-0/+44
| | | | | | | | | * introduces a new IRootMountProvider to register mount points inside the root storage * adds a AppdataPreviewObjectStoreStorage to handle the split between preview folders and bucket number Ref #22033 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Fix static method call for s3 bucket compat checkChristoph Wurst2020-07-031-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update presign method to match with interface again.Daniel Kesselberg2020-06-251-1/+2
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Disable Client-Side Monitoring on AWS storageChristoph Wurst2020-06-151-2/+3
| | | | | | | | | The S3 client enables this by default and then tries to read `.aws/config`. This causes `open_basedir` restriction related error for some setups. So this patch disables the CSM because it's most likely unused anyway. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Upload part size as S3 parameter instead of constant valueFlorent2020-06-092-3/+5
| | | | | | | | Some S3 providers need a custom upload part size (500 MB static value in Nextcloud). Here is a commit to change this value via S3 configuration, instead of using S3_UPLOAD_PART_SIZE constant. A new parameter is added for an S3 connection : uploadPartSize Signed-off-by: Florent <florent@coppint.com>
* Merge pull request #18955 from adrb/swift_upload_large_objectsRoeland Jago Douma2020-05-061-4/+14
|\ | | | | Large Object support for OpenStack Swift
| * Large Object support for OpenStack Swift.Adrian Brzezinski2020-04-271-4/+14
| | | | | | | | | | | | | | | | | | Until now, you wouldn't be able to create objects larger that 5GB. It's somewhat related with pull #18883 Signed-off-by: Adrian Brzezinski <adrian.brzezinski@eo.pl>
* | 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)