Skip to content

Conversation

nupplaphil
Copy link
Collaborator

@nupplaphil nupplaphil commented Feb 20, 2022

It's working :-)

I needed to fix the akeeba library as well (will create a PR for them), but at least I didn't have to include the official AWS library, which contains more than 8.300 files! I thought that would be insane for our specific use case.

I tested the S3 Backend with a Amazon S3 bucket and it worked well

  • Create tested
  • Update (rotating) tested
  • Delete tested

I'd say it's ready :-)

btw. the tests will get fixed after #1238

@nupplaphil nupplaphil changed the title Add S3 Storage Backend [WIP] Add S3 Storage Backend Feb 20, 2022
@nupplaphil nupplaphil marked this pull request as ready for review February 24, 2022 22:23
@nupplaphil nupplaphil changed the title [WIP] Add S3 Storage Backend Add S3 Storage Backend Feb 24, 2022

Akeeba Amazon S3 Connector version 2 has dropped support for PPH 5.3 to 7.0 inclusive. It is only compatible with PHP 7.1 or later, up to and including PHP 8.0.

The most significant change in this version is that all methods use scalar type hints for parameters and return values. This _may_ break existing consumers which relied on implicit type conversion e.g. passing strings containing integer values instead of _actual_ integer values.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good news for these consumers, scalar type hints also do implicit conversion from strings to integers!

Comment on lines +12 to +13
// Protection against direct access
defined('AKEEBAENGINE') or die();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh? What's the point of this in all the files?

@MrPetovan MrPetovan merged commit 3317ce2 into friendica:develop Feb 25, 2022
@AlfredSK
Copy link
Contributor

I'll check this out with my test node mordor.social and a Minio server. Thank you!

@nupplaphil nupplaphil deleted the feat/s3 branch February 25, 2022 15:02
@nupplaphil
Copy link
Collaborator Author

I'll check this out with my test node mordor.social and a Minio server. Thank you!

I think you have to use v2/legacy flag, afaik

Comment on lines +217 to +221
} else {
if (empty($this->getRegion())) {
$this->setRegion('us-east-1');
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not

		} elseif (empty($this->getRegion())) {
			$this->setRegion('us-east-1');
		}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants