diff --git a/packages/server/src/api/controllers/row/utils/basic.ts b/packages/server/src/api/controllers/row/utils/basic.ts index 6255e13c1c..0c2c786e18 100644 --- a/packages/server/src/api/controllers/row/utils/basic.ts +++ b/packages/server/src/api/controllers/row/utils/basic.ts @@ -73,12 +73,15 @@ export function basicProcessing({ // filter the row down to what is actually the row (not joined) for (let field of Object.values(table.schema)) { const fieldName = field.name - const value = extractFieldValue({ + let value = extractFieldValue({ row, tableName: table.name, fieldName, isLinked, }) + if (value instanceof Buffer) { + value = value.toString() + } // all responses include "select col as table.col" so that overlaps are handled if (value != null) { thisRow[fieldName] = value diff --git a/packages/server/src/integrations/utils/utils.ts b/packages/server/src/integrations/utils/utils.ts index aac3f5f74a..e2fba11a4e 100644 --- a/packages/server/src/integrations/utils/utils.ts +++ b/packages/server/src/integrations/utils/utils.ts @@ -192,6 +192,11 @@ export function generateRowIdField(keyProps: any[] = []) { if (!Array.isArray(keyProps)) { keyProps = [keyProps] } + for (let index in keyProps) { + if (keyProps[index] instanceof Buffer) { + keyProps[index] = keyProps[index].toString() + } + } // this conserves order and types // we have to swap the double quotes to single quotes for use in HBS statements // when using the literal helper the double quotes can break things