Uploads an attachment
Before a record can be updated with an attachment, the actual attachment must be uploaded to the server.
Request
POST https://www.activityinfo.org/resources/form/{formId}/record/{recordId}/field/{fieldId}/blob
Request body
multipart/form-data
blobId | string | A client-generated unique identifier for the attachment, matching the pattern [a-z][a-z0-9]{0,25} and unique within the form. |
file | binary | The contents of the attachment |
Response
Status Code | Error Code | Description |
---|---|---|
200 | OK | |
400 | INVALID_ |
The 'blobId' format is not compliant with the required pattern of [a-z][a-z0-9]{0,25} |
400 | MISSING_ |
Request is missing ‘file’ part with contents of attachment. |
400 | MISSING_ |
Request is missing ‘blobId’ part with unique id of attachment. |
401 | AUTHENTICATION_ |
The request must be authenticated |
403 | COLLECTION_ |
The collection link has been closed, and no uploads can be made. |
403 | MISSING_ |
Users must have ADD_RECORD or EDIT_RECORD to stage an attachment |
404 | ATTACHMENT_ |
|
404 | COLLECTION_ |
|
404 | FORM_ |
|
409 | ATTACHMENT_ |
An attachment with this id already exists. |