feat(ExternalStorage) Allow the use of 'prefix' in S3 buckets#61585
Open
mbartsch wants to merge 3 commits into
Open
feat(ExternalStorage) Allow the use of 'prefix' in S3 buckets#61585mbartsch wants to merge 3 commits into
mbartsch wants to merge 3 commits into
Conversation
Signed-off-by: Marcelo H. Bartsch <marcelo@bartsch.cl>
6a2538d to
7e55e24
Compare
4 tasks
Contributor
|
Thank you for your pull request! Also you need to use conventional commit messages (e.g. |
Author
|
Hope now is OK, if not, please let me know. |
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.
Summary
Adds an optional Object key prefix parameter to the S3-Compatible Object Storage external storage backend.
This allows scoping a mount to a sub-path within a shared bucket rather than requiring exclusive use of the entire bucket. For example, setting the
prefix to nextcloud/$user/ will store each user's files under their own namespace within the bucket, with $user being substituted automatically at
mount time.
What changed:
transparently to all S3 key operations (read, write, delete, list, copy, presigned URLs). Keys returned from S3 listing responses have the prefix
stripped before being stored in the in-memory cache or yielded as directory entries. The storage ID includes the prefix so two mounts to the same
bucket with different prefixes are treated as distinct storages.
Variable substitution: $user (and any other registered placeholder) works in the prefix field automatically, since all backend options pass through
the existing applyConfigHandlers() pipeline before the storage is constructed.
TODO
Checklist
(https://docs.nextcloud.com/server/latest/developer_manual/app_development/tutorial.html#integration-tests), api and/or acceptance) are included
AI (if applicable)
Assisted-by: CloudeCode:claude-sonnet-4-6