mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 The cloud sync directory name (Bucket) supports up to 63 characters https://github.com/siyuan-note/siyuan/issues/9130
This commit is contained in:
parent
7cd20f9999
commit
1c6222f3a6
8 changed files with 46 additions and 15 deletions
|
|
@ -322,6 +322,11 @@ func incReindex(upserts, removes []string) (upsertRootIDs, removeRootIDs []strin
|
|||
}
|
||||
|
||||
func SetCloudSyncDir(name string) {
|
||||
if !cloud.IsValidCloudDirName(name) {
|
||||
util.PushErrMsg(Conf.Language(37), 5000)
|
||||
return
|
||||
}
|
||||
|
||||
if Conf.Sync.CloudName == name {
|
||||
return
|
||||
}
|
||||
|
|
@ -379,6 +384,11 @@ func SetSyncProviderS3(s3 *conf.S3) (err error) {
|
|||
s3.Region = strings.TrimSpace(s3.Region)
|
||||
s3.Timeout = util.NormalizeTimeout(s3.Timeout)
|
||||
|
||||
if !cloud.IsValidCloudDirName(s3.Bucket) {
|
||||
util.PushErrMsg(Conf.Language(37), 5000)
|
||||
return
|
||||
}
|
||||
|
||||
Conf.Sync.S3 = s3
|
||||
Conf.Save()
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue