From b265f812d6d2f5218e4ea79a49be4e596c1fa442 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Sat, 26 Nov 2022 12:06:04 +0800 Subject: [PATCH] fix(nocodb): change attachment sample payload to array of objects --- .../nocodb/src/lib/meta/helpers/populateSamplePayload.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/nocodb/src/lib/meta/helpers/populateSamplePayload.ts b/packages/nocodb/src/lib/meta/helpers/populateSamplePayload.ts index 0f0a068a22..6fad3c575b 100644 --- a/packages/nocodb/src/lib/meta/helpers/populateSamplePayload.ts +++ b/packages/nocodb/src/lib/meta/helpers/populateSamplePayload.ts @@ -94,7 +94,14 @@ async function getSampleColumnValue(column: Column): Promise { break; case UITypes.Attachment: { - return '[{"url":"https://nocodb.com/dummy.png","title":"image.png","mimetype":"image/png","size":0}]'; + return [ + { + url: 'https://nocodb.com/dummy.png', + title: 'image.png', + mimetype: 'image/png', + size: 0, + }, + ]; } break; case UITypes.Checkbox: