summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/Lib/Storage/AmazonS3.php
Commit message (Collapse)AuthorAgeFilesLines
* feat: add a specialized writeStream implementation for s3 external storageRobin Appelman2024-07-241-0/+21
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* chore: Add SPDX headerAndy Scherzinger2024-06-061-36/+3
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-231-5/+2
| | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* Return correct status if touch failedLouis Chemineau2023-10-231-11/+13
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* use multipart copy for s3Robin Appelman2023-09-201-4/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* handle more exceptions in AmazonS3::fopenRobin Appelman2023-07-131-1/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Update AmazonS3.phpJames Guo2023-04-061-1/+1
| | | Signed-off-by: James Guo <i@ze3kr.com>
* Support of s3 storage class in External Storage applicationFrançois Ménabé2023-01-121-1/+2
| | | | Signed-off-by: François Ménabé <francois.menabe@gmail.com>
* fix s3 directory copyRobin Appelman2022-11-151-3/+3
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Rename file1 and file2 to source and target in Storage abstractionCarl Schwan2022-10-181-22/+22
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Additional type hinting found by psalmCarl Schwan2022-10-181-1/+1
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Port away from deprecated clearBucket callCarl Schwan2022-10-161-9/+2
| | | | | | | | | | This was removed a long time ago in the library that we use, but never detected since this was inside a try catch block... Remove the call for now and we should investigate newer api in the future. Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Port to LoggerInterfaceCarl Schwan2022-10-161-10/+44
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* handle AccessDenied error when checking if external s3 support versionsMatthieu Gallien2022-07-281-1/+1
| | | | Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
* Move CappedMemoryCache to OCPCarl Schwan2022-07-141-1/+1
| | | | | | | | This is an helpful helper that should be used in more place than just server and this is already the case with groupfodlers, deck, user_oidc and more using it, so let's make it public Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Add stricter psalm type for CappedMemoryCacheCarl Schwan2022-05-121-16/+12
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Add a public replacement for OC::$server->getCarl Schwan2022-05-101-2/+3
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* AmazonS3: allow not implemented versioningErik van Velzen2022-03-151-2/+14
| | | | | | | | | | In case the S3 implementation does not implement versioning, set it to false. Versioning was introduced in Nexcloud in commit 09ffac5e6dd5355c9aaf49c098942fa1e4fbed25 This is needed for compatibility with the Storj gateway. Signed-off-by: Erik van Velzen <erik@evanv.nl>
* Use unique combination of hostname/bucket/key for external storagesJulius Härtl2021-11-041-0/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* cache versioning enabled statusRobin Appelman2021-10-191-2/+16
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* minor directory detect improvementsRobin Appelman2021-10-191-2/+2
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* always set Key field in `headObject`Robin Appelman2021-10-151-1/+3
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* more reliable hasUpdated for s3Robin Appelman2021-10-151-0/+13
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* remove old migration methodRobin Appelman2021-10-151-31/+0
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* optimize filetype for s3 directories a bitRobin Appelman2021-10-151-0/+3
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* more reliable directory copyRobin Appelman2021-10-151-20/+10
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* doesDirectoryExist fixesRobin Appelman2021-10-151-4/+4
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* s3 external storage listing reworkRobin Appelman2021-10-151-96/+147
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Revert "Delete S3 versions in rmdir"Vincent Petry2021-10-121-23/+1
|
* Delete S3 versions in rmdirVincent Petry2021-10-111-1/+23
| | | | | | | When deleting a complete folder in a bucket that has versioning enabled, also make sure to delete all associated versions and delete markers Signed-off-by: Vincent Petry <vincent@nextcloud.com>
* Fix folder size contained in S3 bucketsLouis Chemineau2021-08-191-4/+9
| | | | | | If 'filesystem_check_changes' was set to never, the cached size was alway set to -1 (Pending) on every access Signed-off-by: Louis Chemineau <louis@chmn.me>
* Delete object to cleanup leftover of paths when removing directoriesJulius Härtl2021-08-131-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>
* set mimetype for objects uploaded to object storagesRobin Appelman2021-04-211-2/+7
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Update all license headers for Nextcloud 21Christoph Wurst2020-12-161-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Remove the deprecated update.phpChristoph Wurst2020-11-271-1/+1
| | | | | | | | * It was documented as deprecated. * The app code checker warned about it * It's been three years Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Check if array elements exist before using themRoeland Jago Douma2020-10-251-1/+7
| | | | | | | | It seems that in some recent upgrade here. Not always the entries we expect are returned. So we should first check if they exist. As to not spam the log. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Set delimiter so that the CommonPrefixes response can properly be determinedJulius Härtl2020-09-101-1/+2
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* fix s3 doesDirectoryExist check for empty directoriesRobin Appelman2020-09-101-1/+1
| | | | | | | | | | if a directory is empty, only the 'marker' object `/` exists. since not all s3 implementations return just the prefix when listing objects by prefix, when listing objects by the folder prefix, nothing will be returned if the directory is empty. by not including the trailing slash in the prefix, the folder marked will always be returned if it exists Signed-off-by: Robin Appelman <robin@icewind.nl>
* Fix reading empty files from objectstorageRoeland Jago Douma2020-09-091-2/+8
| | | | | | | | 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>
* Update the license headers for Nextcloud 20Christoph Wurst2020-08-241-0/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #21734 from nextcloud/external-s3-no-touchMorris Jobke2020-08-201-17/+1
|\ | | | | disable touch to update mtime for external s3 storage
| * disable touch to update mtime for external s3 storageRobin Appelman2020-07-071-17/+1
| | | | | | | | | | | | since updating the mtime requires doing a copy this can have a significant overhead and it messes with versioning Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Reuse cache for directory mtime/size if filesystem changes can be ignoredJulius Härtl2020-07-071-0/+6
|/ | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Remove rescanDelay from directory mtimeJulius Härtl2020-06-221-6/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-101-3/+0
| | | | | | | | | | | | | | | 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-2/+2
| | | | 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-14/+14
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Update license headersChristoph Wurst2019-12-051-1/+4
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>