Merge pull request #15679 from Budibase/allow-public-view-attachment-uploads

Allow uploading attachments through views
This commit is contained in:
Andrew Kingston 2025-03-11 19:33:10 +00:00 committed by GitHub
commit 8f19b4250b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -49,7 +49,11 @@
data.append("file", fileList[i])
}
try {
return await API.uploadAttachment(formContext?.dataSource?.tableId, data)
let sourceId = formContext?.dataSource?.tableId
if (formContext?.dataSource?.type === "viewV2") {
sourceId = formContext.dataSource.id
}
return await API.uploadAttachment(sourceId, data)
} catch (error) {
return []
}