chore: tweak naming

This commit is contained in:
Steven
2024-05-13 20:03:04 +08:00
parent 62705fed39
commit b8763905ba
35 changed files with 460 additions and 483 deletions

View File

@@ -308,7 +308,7 @@ func SaveResourceBlob(ctx context.Context, s *store.Store, create *store.Resourc
return errors.Wrap(err, "Failed to find workspace storage setting")
}
if workspaceStorageSetting.StorageType == storepb.WorkspaceStorageSetting_STORAGE_TYPE_LOCAL {
if workspaceStorageSetting.StorageType == storepb.WorkspaceStorageSetting_LOCAL {
filepathTemplate := "assets/{timestamp}_{filename}"
if workspaceStorageSetting.FilepathTemplate != "" {
filepathTemplate = workspaceStorageSetting.FilepathTemplate
@@ -343,7 +343,7 @@ func SaveResourceBlob(ctx context.Context, s *store.Store, create *store.Resourc
create.Reference = internalPath
create.Blob = nil
create.StorageType = storepb.ResourceStorageType_LOCAL
} else if workspaceStorageSetting.StorageType == storepb.WorkspaceStorageSetting_STORAGE_TYPE_S3 {
} else if workspaceStorageSetting.StorageType == storepb.WorkspaceStorageSetting_S3 {
s3Config := workspaceStorageSetting.S3Config
if s3Config == nil {
return errors.Errorf("No actived external storage found")