External storage $user contains characters not valid for S3 bucket names


I’m using nextcloud 20.0.1 with external storage locations on S3.

I’d like to add further S3 storage locations from another S3 provider. However, the new provider does not allow the ‘.’ character in bucket names, and unfortunately many of my user names have a ‘.’ in them. This also applies to the ‘@’ character, which might also be quite common in user names.

It seems that there are differences in naming schemes for buckets, but fact is there are S3 providers with strict limitations which might conflict with $user:

Is there a way to replace characters in $user in the configuration of external storag locations?

kind regards,

1 Like

Did you ever make any progress on this?

Hi joho68,

No, I haven’t addressed this issue in other places. I worked around it with manually defined storage paths, which was annoying but not impossible since my installation isn’t too large.

Alright, thanks for getting back to me on it though. I cannot for the life of me figure out why there’s no automated mechanism present to handle automatic creation (and mapping) of buckets based on the user context.

Seems to me it’d only require a unique numerical or base64 user ID and then try to create that bucket if it doesn’t exist. (The reason for the unique user ID is to avoid naming problems.) But this may very well be beyond the scope for Nextcloud and or External storage.