mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-08 17:11:14 +00:00
Merge pull request 'feat(backblaze): Include milliseconds since epoch to bucket name' (#403) from better-bucket-name into master
Reviewed-on: https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/pulls/403 Reviewed-by: Inex Code <inex.code@selfprivacy.org>
This commit is contained in:
commit
4eb3dac101
|
@ -63,8 +63,8 @@ class BackupsCubit extends ServerInstallationDependendCubit<BackupsState> {
|
|||
.state.serverDomain!.domainName
|
||||
.replaceAll(RegExp(r'[^a-zA-Z0-9]'), '-');
|
||||
final int serverId = serverInstallationCubit.state.serverDetails!.id;
|
||||
String bucketName = 'selfprivacy-$domain-$serverId';
|
||||
// If bucket name is too long, shorten it
|
||||
String bucketName =
|
||||
'${DateTime.now().millisecondsSinceEpoch}-$serverId-$domain';
|
||||
if (bucketName.length > 49) {
|
||||
bucketName = bucketName.substring(0, 49);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue