Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Amazon S3 'autocreate => true' is not working #6289

Closed
KroniK907 opened this issue Aug 29, 2017 · 3 comments
Closed

Using Amazon S3 'autocreate => true' is not working #6289

KroniK907 opened this issue Aug 29, 2017 · 3 comments

Comments

@KroniK907
Copy link

KroniK907 commented Aug 29, 2017

In attempting to figure out why primary storage for Amazon S3 is not working I stumbled upon a bug in the S3 connection code.

The Bug is located here on lines 98-100.

If a user wishes to create an S3 bucket via the autocreate => true option they must specify a region, however the createBucket method run on line 98 requires the region to be passed if it is not being created in the default us-east-1 region.

AWS Documentation Here

Simple fix is to add the following line:

'LocationConstraint' => empty($this->params['region']) ? 'us-east-1' : $this->params['region'],

There is zero documentation that I can find of how to get the source up and running with composer/bower/node, and since I'm a bit of a newb when it comes to large scale web projects like this, I don't really understand how to properly run the unit tests etc to verify that my code addition works as expected, so I'd rather just ask one of you guys to please fix.

@KroniK907
Copy link
Author

KroniK907 commented Aug 29, 2017

Actually now that I look carefully, the autocreate => true argument is not even used in the S3 code. It automatically creates a new bucket if it doesn't exist, even if autocreate => false is set.

Either the autocreate setting should be removed from the documentation or there should be an if statement in there checking for the value of $this->params['autocreate']

@MorrisJobke MorrisJobke changed the title [Bug] Amazon S3 'autocreate => true' bugged Using Amazon S3 'autocreate => true' is not working Sep 3, 2017
@nextcloud-bot nextcloud-bot added the stale Ticket or PR with no recent activity label Jun 20, 2018
@skjnldsv skjnldsv added the 0. Needs triage Pending check for reproducibility or if it fits our roadmap label Jun 6, 2019
@stale stale bot removed the stale Ticket or PR with no recent activity label Jun 6, 2019
@skjnldsv skjnldsv added 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Aug 20, 2020
@skjnldsv
Copy link
Member

cc @icewind1991 ? :)

@szaimen
Copy link
Contributor

szaimen commented Jan 9, 2023

Hi, please update to 24.0.8 or better 25.0.2 and report back if it fixes the issue. Thank you!

@szaimen szaimen added needs info 0. Needs triage Pending check for reproducibility or if it fits our roadmap and removed 1. to develop Accepted and waiting to be taken care of labels Jan 9, 2023
@szaimen szaimen closed this as completed Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants