feat: save email contents in S3#463
Open
sakithb wants to merge 6 commits into
Open
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
supun-io
requested changes
Jul 8, 2026
Member
There was a problem hiding this comment.
- Update Env docs
- Configure the default filesystem to be
file, which saves uses local filesystem. For self-hosted setups, we will keep file the default. S3 would only be needed for advanced use cases. Use/app/mediafolder in the container - Deploy easy and prod compose files:
- update compose.yaml to mount
/app/mediato a volume by default
- update compose.yaml to mount
- Create a new docs page: Upgrade Guide. We will release this as 0.1.0, so, document that deployments need either update their compose.yaml to configure the volume, or setup s3
- update prod deploy docs -> .env Configuration section to add S3_ variables after the OIDC_ variables. Mark it as option. Let the user know they can connect their own S3 platform if needed, and it's recommended for scaling.
- fix go-staticcheck errors
- codecov says some lines are not covered. Don't have to cover all, but make sure important ones are covered
| return static function (ContainerConfigurator $containerConfigurator): void { | ||
| $containerConfigurator->parameters() | ||
| ->set('env(HOSTING)', 'self') // Default to self-hosted | ||
| ->set('app.filesystem_default', 's3') |
Member
There was a problem hiding this comment.
instead, following our convention, set defaults by setting them in .env file (applies to all envs).
| $services->set(Filesystem::class) | ||
| ->factory([FilesystemFactory::class, 'create']) | ||
| ->args([ | ||
| '%env(default:app.filesystem_default:string:FILESYSTEM)%', |
Member
There was a problem hiding this comment.
just use default::string:FILESYSTEM
| ) { | ||
| } | ||
|
|
||
| public function store(string $uuid, SendContent $content): void |
Member
There was a problem hiding this comment.
exception handling should be done: https://flysystem.thephpleague.com/docs/usage/exception-handling/
(important for s3, since it depends on network)
Member
There was a problem hiding this comment.
document @throws here, and then catch it from where this is called
| $this->filesystem->write($this->getJsonPath($uuid), $this->encodeJson($content)); | ||
| } | ||
|
|
||
| public function getRaw(string $uuid): ?string |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #447