From 630de0f3394efd1cdd3d5bbe9afbf1ba8148bee9 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Wed, 12 Apr 2023 13:23:48 +0800 Subject: [PATCH 01/14] fix(nc-gui): attachment input height --- packages/nc-gui/components/smartsheet/Cell.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nc-gui/components/smartsheet/Cell.vue b/packages/nc-gui/components/smartsheet/Cell.vue index 4a61552030..2023ec9604 100644 --- a/packages/nc-gui/components/smartsheet/Cell.vue +++ b/packages/nc-gui/components/smartsheet/Cell.vue @@ -193,7 +193,7 @@ onUnmounted(() => { `nc-cell-${(column?.uidt || 'default').toLowerCase()}`, { 'text-blue-600': isPrimary(column) && !props.virtual && !isForm }, { 'nc-grid-numeric-cell': isGrid && !isForm && isNumericField }, - { 'h-[40px]': !props.editEnabled && isForm && !isSurveyForm }, + { 'h-[40px]': !props.editEnabled && isForm && !isSurveyForm && !isAttachment(column) }, ]" @keydown.enter.exact="navigate(NavigateDir.NEXT, $event)" @keydown.shift.enter.exact="navigate(NavigateDir.PREV, $event)" From 694b6126d8a73d1a41b0069fc47c3e2fa627dbf5 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Thu, 13 Apr 2023 19:57:15 +0800 Subject: [PATCH 02/14] fix(nocodb): use multipart/form-data to make multer works --- packages/nocodb/src/schema/swagger.json | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/packages/nocodb/src/schema/swagger.json b/packages/nocodb/src/schema/swagger.json index 1fcfc3e4eb..b4e9f6c9c5 100644 --- a/packages/nocodb/src/schema/swagger.json +++ b/packages/nocodb/src/schema/swagger.json @@ -10886,20 +10886,7 @@ }, "requestBody": { "content": { - "application/json": { - "schema": { - "type": "object", - "description": "Data Object where the key is column and the value is the data value" - }, - "examples": { - "Example 1": { - "value": { - "col1": "foo", - "col2": "bar" - } - } - } - } + "multipart/form-data": {} }, "description": "" }, From 72de7be4a4a7b5eca2b95cd322916d0708b33039 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Thu, 13 Apr 2023 19:57:32 +0800 Subject: [PATCH 03/14] chore(sdk): regenerate Api.ts --- packages/nocodb-sdk/src/lib/Api.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nocodb-sdk/src/lib/Api.ts b/packages/nocodb-sdk/src/lib/Api.ts index 2407419a29..cdcd4d5800 100644 --- a/packages/nocodb-sdk/src/lib/Api.ts +++ b/packages/nocodb-sdk/src/lib/Api.ts @@ -7905,7 +7905,7 @@ export class Api< */ dataCreate: ( sharedViewUuid: string, - data: object, + data: any, params: RequestParams = {} ) => this.request< @@ -7918,7 +7918,7 @@ export class Api< path: `/api/v1/db/public/shared-view/${sharedViewUuid}/rows`, method: 'POST', body: data, - type: ContentType.Json, + type: ContentType.FormData, format: 'json', ...params, }), From d171920cb790958404d0aebfe82508dc2d2f252c Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Thu, 13 Apr 2023 20:02:09 +0800 Subject: [PATCH 04/14] chore(nocodb): add comment --- .../src/lib/controllers/publicControllers/publicData.ctl.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/nocodb/src/lib/controllers/publicControllers/publicData.ctl.ts b/packages/nocodb/src/lib/controllers/publicControllers/publicData.ctl.ts index 76d708e241..311e4ecb58 100644 --- a/packages/nocodb/src/lib/controllers/publicControllers/publicData.ctl.ts +++ b/packages/nocodb/src/lib/controllers/publicControllers/publicData.ctl.ts @@ -31,6 +31,7 @@ async function dataInsert(req: Request & { files: any[] }, res: Response) { password: req.headers?.['xc-password'] as string, body: req.body?.data, siteUrl: (req as any).ncSiteUrl, + // req.files is enriched by multer files: req.files, }); From 0059e8ef2186484b8722e06e89febbb64bad583a Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Fri, 14 Apr 2023 13:25:15 +0800 Subject: [PATCH 05/14] docs: adopt NuxtLink for internal routes --- .../noco-docs/content/en/developer-resources/rest-apis.md | 2 +- packages/noco-docs/content/en/developer-resources/sdk.md | 4 ++-- packages/noco-docs/content/en/getting-started/upgrading.md | 2 +- packages/noco-docs/content/en/index.md | 6 +++--- .../content/en/setup-and-usages/meta-management.md | 2 +- .../content/en/setup-and-usages/table-operations.md | 6 +++--- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/noco-docs/content/en/developer-resources/rest-apis.md b/packages/noco-docs/content/en/developer-resources/rest-apis.md index 328932159d..b2e8aa693b 100644 --- a/packages/noco-docs/content/en/developer-resources/rest-apis.md +++ b/packages/noco-docs/content/en/developer-resources/rest-apis.md @@ -12,7 +12,7 @@ Once you've created the schemas, you can manipulate the data or invoke actions u Here's the overview of all APIs. For the details, please check out NocoDB API Documentation. -You may also interact with the API's resources via Swagger UI. +You may also interact with the API's resources via Swagger UI. Currently, the default value for {orgs} is noco. Users will be able to change it in the future release. diff --git a/packages/noco-docs/content/en/developer-resources/sdk.md b/packages/noco-docs/content/en/developer-resources/sdk.md index 53a5efee91..fa4a94ab22 100644 --- a/packages/noco-docs/content/en/developer-resources/sdk.md +++ b/packages/noco-docs/content/en/developer-resources/sdk.md @@ -9,7 +9,7 @@ menuTitle: 'NocoDB SDK' We provide SDK for users to integrate with their applications. Currently only SDK for Javascript is supported. -Note: The NocoDB SDK requires authorization token. If you haven't created one, please check out Accessing APIs for details. +Note: The NocoDB SDK requires authorization token. If you haven't created one, please check out Accessing APIs for details. ## SDK For Javascript @@ -57,7 +57,7 @@ const api = new Api({ Once you have configured `api`, you can call different types of APIs by `api..`. -For Tag and FunctionName, please check out the API table here. +For Tag and FunctionName, please check out the API table here. #### Example: Calling API - /api/v1/db/meta/projects/{projectId}/tables diff --git a/packages/noco-docs/content/en/getting-started/upgrading.md b/packages/noco-docs/content/en/getting-started/upgrading.md index 9ed66e642d..1eecf2bfd7 100644 --- a/packages/noco-docs/content/en/getting-started/upgrading.md +++ b/packages/noco-docs/content/en/getting-started/upgrading.md @@ -8,7 +8,7 @@ link: https://codesandbox.io/embed/vigorous-firefly-80kq5?hidenavigation=1&theme --- By default, if `NC_DB` is not specified upon -installation, then SQLite will be used to store metadata. We suggest users to separate the metadata and user data in different databases as pictured in our architecture. +installation, then SQLite will be used to store metadata. We suggest users to separate the metadata and user data in different databases as pictured in our architecture. ## Docker diff --git a/packages/noco-docs/content/en/index.md b/packages/noco-docs/content/en/index.md index d79a6c3020..4e1b575901 100644 --- a/packages/noco-docs/content/en/index.md +++ b/packages/noco-docs/content/en/index.md @@ -31,7 +31,7 @@ Also NocoDB's app store allows you to build business workflows on views with com ### App Store for Workflow Automations -We provide different integrations in three main categories. See App Store for details. +We provide different integrations in three main categories. See App Store for details. - ⚡  Chat : Slack, Discord, Mattermost, and etc - ⚡  Email : AWS SES, SMTP, MailerSend, and etc @@ -46,11 +46,11 @@ We provide the following ways to let users to invoke actions in a programmatic w ### Sync Schema -We allow you to sync schema changes if you have made changes outside NocoDB GUI. However, it has to be noted then you will have to bring your own schema migrations for moving from environment to others. See Sync Schema for details. +We allow you to sync schema changes if you have made changes outside NocoDB GUI. However, it has to be noted then you will have to bring your own schema migrations for moving from environment to others. See Sync Schema for details. ### Audit -We are keeping all the user operation logs under one place. See Audit for details. +We are keeping all the user operation logs under one place. See Audit for details. ## Why are we building this? Most internet businesses equip themselves with either spreadsheet or a database to solve their business needs. Spreadsheets are used by a Billion+ humans collaboratively every single day. However, we are way off working at similar speeds on databases which are way more powerful tools when it comes to computing. Attempts to solve this with SaaS offerings has meant horrible access controls, vendor lockin, data lockin, abrupt price changes & most importantly a glass ceiling on what's possible in future. diff --git a/packages/noco-docs/content/en/setup-and-usages/meta-management.md b/packages/noco-docs/content/en/setup-and-usages/meta-management.md index 3c6825bf80..266e1155e6 100644 --- a/packages/noco-docs/content/en/setup-and-usages/meta-management.md +++ b/packages/noco-docs/content/en/setup-and-usages/meta-management.md @@ -28,7 +28,7 @@ To access it, click the down arrow button next to Project Name on the top left s ## Sync Metadata -Go to `Data Sources`, click ``Sync Metadata``, you can see your metadata sync status. If it is out of sync, you can sync the schema. See Sync Schema for more.0 +Go to `Data Sources`, click ``Sync Metadata``, you can see your metadata sync status. If it is out of sync, you can sync the schema. See Sync Schema for more. ![image](https://user-images.githubusercontent.com/35857179/219833485-3bcaa6ec-88bc-47cc-b938-5abb4835dc31.png) diff --git a/packages/noco-docs/content/en/setup-and-usages/table-operations.md b/packages/noco-docs/content/en/setup-and-usages/table-operations.md index e6245bdea3..a41449729b 100644 --- a/packages/noco-docs/content/en/setup-and-usages/table-operations.md +++ b/packages/noco-docs/content/en/setup-and-usages/table-operations.md @@ -155,7 +155,7 @@ You can use Quick Import when you have data from external sources such as Airtab ### Import Airtable into an Existing Project -- See here +- See here ### Import CSV data into an Existing Project @@ -165,7 +165,7 @@ You can use Quick Import when you have data from external sources such as Airtab - **Use First Row as Headers**: If it is checked, the first row will be treated as header row. - **Import Data**: If it is checked, all data will be imported. Otherwise, only table will be created. ![image](https://user-images.githubusercontent.com/35857179/197454479-1ed18dce-1d0b-4ee3-88b3-9b6a132dea2a.png) -- You can revise the table name by double clicking it, column name and column type. By default, the first column will be chosen as Display Value and cannot be deleted. +- You can revise the table name by double clicking it, column name and column type. By default, the first column will be chosen as Display Value and cannot be deleted. ![image](https://user-images.githubusercontent.com/35857179/197454633-5b30323e-2b13-4c55-843a-948c093d373e.png) - Click `Import` to start importing process. The table will be created and the data will be imported. ![image](https://user-images.githubusercontent.com/35857179/197455547-2d93df5e-a7f0-4c88-af53-990067625967.png) @@ -178,7 +178,7 @@ You can use Quick Import when you have data from external sources such as Airtab - **Use First Row as Headers**: If it is checked, the first row will be treated as header row. - **Import Data**: If it is checked, all data will be imported. Otherwise, only table will be created. ![image](https://user-images.githubusercontent.com/35857179/197455788-8dd8a7d1-38f3-48c3-a05e-6ab0cf25045c.png) -- You can revise the table name, column name and column type. By default, the first column will be chosen as Display Value and cannot be deleted. +- You can revise the table name, column name and column type. By default, the first column will be chosen as Display Value and cannot be deleted. Note: If your Excel file contains multiple sheets, each sheet will be stored in a separate table. From e86aef08cb1add36c84d25bcccf48d20bd7a08f5 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Fri, 14 Apr 2023 14:05:44 +0800 Subject: [PATCH 06/14] chore(nc-gui): import iconMap --- packages/nc-gui/components/cell/attachment/Image.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/nc-gui/components/cell/attachment/Image.vue b/packages/nc-gui/components/cell/attachment/Image.vue index 8c3669be0f..625096b106 100644 --- a/packages/nc-gui/components/cell/attachment/Image.vue +++ b/packages/nc-gui/components/cell/attachment/Image.vue @@ -1,4 +1,6 @@