The form element name for accessing its submission data
The submission data model to be submitted
Upload a submission attachment. Attachment can be passed as a Blob
,
Uint8Array
or string
(base64). Will return data required form accessing
the attachment.
const blob = new Blob(['a string of data'], {
type: 'text/plain',
})
const file = {
formId: 1,
data: blob,
fileName: 'file.jpg',
contentType: 'image/jpeg',
isPrivate: true, // Whether the attachment will be able to be downloaded by other users
}
const abortController = new AbortController()
const {
s3: {
key, // string
bucket, // string
region, // string
},
url, // string
contentType, // string
fileName, // string
id, //string
isPrivate, // boolean
uploadedAt, // string
} = await submissionService.uploadAttachment(
file,
abortController.signal,
)
Attachments Service
Helper functions for attachment handling