This will be a POST request with the content type multipart/form-data, sent to /api/cards/{cardId}/attachments, and the file will be sent in a parameter named file. The response of the API will be similar to the following:
{
"id": 5,
"fileName": " Artisan in a pottery shop.jpg",
"fileType": "jpg",
"fileUrl": "/local-file/attachments/1538189609099.b2e98bbb-0a9d-49ee-
bff2-2a4a14b38dba.jpg",
"previewUrl": "/local-file/attachments/1538189609099.b2e98bbb-0a9d-
49ee-bff2-2a4a14b38dba.thumbnail.jpg",
"userId": 1,
"createdDate": 1538189609000
}
previewUrl will be used for previewing the attachment when it is an image. When the file is not an image, its value will be an empty string.