Browse Source

Merge pull request #9151 from nocodb/nc-fix/csv-lookup-attachment

fix: properly export looked up attachments
pull/9166/head
Pranav C 4 months ago committed by GitHub
parent
commit
ce25cde5d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      packages/nocodb/src/helpers/dataHelpers.ts

5
packages/nocodb/src/helpers/dataHelpers.ts

@ -167,16 +167,17 @@ export async function serializeCellValue(
} }
if (!Array.isArray(data)) { if (!Array.isArray(data)) {
data = undefined; data = [data];
} }
} catch { } catch {
data = undefined; data = undefined;
} }
return (data || []) return (data || [])
.filter((attachment) => attachment)
.map( .map(
(attachment) => (attachment) =>
`${encodeURI(attachment.title)}(${encodeURI( `${attachment.title || 'Attachment'}(${encodeURI(
attachment.signedPath attachment.signedPath
? `${siteUrl}/${attachment.signedPath}` ? `${siteUrl}/${attachment.signedPath}`
: attachment.signedUrl, : attachment.signedUrl,

Loading…
Cancel
Save