unique identifier of the owner
type of the owner
injected service use to handle the attachment related operations
injected logger used to handle the logging
request context [headers, body, params, query]. Note:
body
is required201 Status Created
This handler is used to create an attachment by applying the following steps in sequence:
Check if request body exists
Create the attachment (attachmentService.createAttachment)
Get the created attachment (attachmentService.getOneAttachment)
Normalize the attachment (attachmentService.normalizeAttachment)
Return the normalized attachment
Error
500 NBError Internal Server Error
{
"id": "1",
"ownerId": "userId",
"ownerType": "user",
"name": "image.png",
"type": "image/png",
"isPublic": true,
"url": "https://api.example.com/attachments/objectId",
}
Generated using TypeDoc
Create an attachment