-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
18 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,22 @@ | ||
--- /dev/null | ||
+++ ../src/Adapters/Manager.php | ||
@@ -13,6 +13,7 @@ | ||
namespace FoF\Upload\Adapters; | ||
|
||
use Aws\S3\S3Client; | ||
+use Flarum\Foundation\Application; | ||
use Flarum\Foundation\Paths; | ||
use Flarum\Foundation\ValidationException; | ||
use Flarum\Settings\SettingsRepositoryInterface; | ||
@@ -49,12 +50,18 @@ | ||
*/ | ||
protected $settings; | ||
|
||
- public function __construct(Dispatcher $events, Paths $paths, Util $util, SettingsRepositoryInterface $settings) | ||
+ /** | ||
+ * @var Application | ||
+ */ | ||
+ protected $app; | ||
+ | ||
+ public function __construct(Dispatcher $events, Paths $paths, Util $util, SettingsRepositoryInterface $settings, Application $app) | ||
{ | ||
$this->events = $events; | ||
$this->paths = $paths; | ||
$this->util = $util; | ||
$this->settings = $settings; | ||
+ $this->app = $app; | ||
@@ -39,7 +39,8 @@ | ||
protected Paths $paths, | ||
protected Util $util, | ||
protected SettingsRepositoryInterface $settings, | ||
- protected UrlGenerator $url | ||
+ protected UrlGenerator $url, | ||
+ protected Application $app, | ||
) { | ||
} | ||
|
||
public function adapters(): Collection | ||
@@ -125,7 +132,8 @@ | ||
return new Adapters\AwsS3( | ||
new AwsS3Adapter( | ||
new S3Client($s3Config), | ||
- $this->settings->get('fof-upload.awsS3Bucket') | ||
+ $this->settings->get('fof-upload.awsS3Bucket'), | ||
+ $this->app->config('fof_upload_prefix', ''), | ||
) | ||
@@ -107,7 +108,8 @@ | ||
|
||
$leagueAdapter = new AwsS3Adapter( | ||
new S3Client($s3Config), | ||
- $this->settings->get('fof-upload.awsS3Bucket') | ||
+ $this->settings->get('fof-upload.awsS3Bucket'), | ||
+ $this->app->config('fof_upload_prefix', ''), | ||
); | ||
} | ||
|
||
return new Adapters\AwsS3($leagueAdapter, $this->settings, $this->url); |
10 changes: 0 additions & 10 deletions
10
patches/fof-upload-src-templates-markdownimagetemplate-php.patch
This file was deleted.
Oops, something went wrong.
35 changes: 0 additions & 35 deletions
35
patches/fof-webhooks-override-opis-closure-serializableclosure-php.patch
This file was deleted.
Oops, something went wrong.