diff --git a/packages/nc-gui/components/workspace/integrations/forms/EditOrAddDatabase.vue b/packages/nc-gui/components/workspace/integrations/forms/EditOrAddDatabase.vue index 081c99b774..f8144ac038 100644 --- a/packages/nc-gui/components/workspace/integrations/forms/EditOrAddDatabase.vue +++ b/packages/nc-gui/components/workspace/integrations/forms/EditOrAddDatabase.vue @@ -359,9 +359,13 @@ const handleImportURL = async () => { formState.value.dataSource.client = connectionConfig.client formState.value.dataSource.connection = { ...connectionConfig.connection, - connection: { + } + + // set filename only for sqlite connection + if (connectionConfig.client === ClientType.SQLITE) { + formState.value.dataSource.connection.connection = { filename: connectionConfig?.connection?.filename || '', - }, + } } } else { message.error(t('msg.error.invalidURL')) diff --git a/packages/nocodb-sdk/src/lib/connectionConfigUtils.ts b/packages/nocodb-sdk/src/lib/connectionConfigUtils.ts index 60e7ea81c5..b84f9cc883 100644 --- a/packages/nocodb-sdk/src/lib/connectionConfigUtils.ts +++ b/packages/nocodb-sdk/src/lib/connectionConfigUtils.ts @@ -2,7 +2,7 @@ import { SSLUsage } from '~/lib/enums'; export const validateAndExtractSSLProp = ( connectionConfig: any, - sslUse: SSLUsage = SSLUsage.No, + sslUse: SSLUsage, client: string ) => { if ('ssl' in connectionConfig && connectionConfig.ssl) {