mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-08 17:11:14 +00:00
feat(backblaze): Include milliseconds since epoch to bucket name
- Resolve https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.app/issues/263
This commit is contained in:
parent
79f73ec729
commit
faa02c54fe
|
@ -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 =
|
||||
'$domain-$serverId-${DateTime.now().millisecondsSinceEpoch}';
|
||||
if (bucketName.length > 49) {
|
||||
bucketName = bucketName.substring(0, 49);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue