This will be a GET request sent to /api/cards/{cardId}/attachments with a response similar to the following:
{
"attachments": [{
"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
}]
}
In the next few sections, we will focus on the implementation details of the add attachment API to see how to save an uploaded file on the server or save it to AWS S3, as well as generating a thumbnail when an attachment is an image.