fix(storage): allow staging local config when S3 is unreachable

When switching storage drivers in admin settings, save now validates
connectivity against the selected target backend instead of retesting
the still-active driver. The active driver remains unchanged until
migration completes, so unreachable MinIO no longer blocks saving local
storage settings.
This commit is contained in:
ryan
2026-06-18 13:28:56 +08:00
parent 2648f3f3b7
commit e766066a75
3 changed files with 91 additions and 18 deletions
@@ -149,13 +149,8 @@ export function StorageConfigTab() {
const saveMutation = useMutation({
mutationFn: async (value: StorageConfig) => {
const activeDriver = query.data?.config.driver || value.driver
const valueToSave = {
...value,
driver: activeDriver,
}
await services.adminSystemConfig.updateSystemConfig(storageConfigKey, {
value: JSON.stringify(valueToSave),
value: JSON.stringify(value),
})
},
onSuccess: () => {