mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-09 17:39:42 +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
|
.state.serverDomain!.domainName
|
||||||
.replaceAll(RegExp(r'[^a-zA-Z0-9]'), '-');
|
.replaceAll(RegExp(r'[^a-zA-Z0-9]'), '-');
|
||||||
final int serverId = serverInstallationCubit.state.serverDetails!.id;
|
final int serverId = serverInstallationCubit.state.serverDetails!.id;
|
||||||
String bucketName = 'selfprivacy-$domain-$serverId';
|
String bucketName =
|
||||||
// If bucket name is too long, shorten it
|
'$domain-$serverId-${DateTime.now().millisecondsSinceEpoch}';
|
||||||
if (bucketName.length > 49) {
|
if (bucketName.length > 49) {
|
||||||
bucketName = bucketName.substring(0, 49);
|
bucketName = bucketName.substring(0, 49);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue