diff --git a/packages/frontend-core/src/api/attachments.js b/packages/frontend-core/src/api/attachments.js index f79b461574..597b8f3b10 100644 --- a/packages/frontend-core/src/api/attachments.js +++ b/packages/frontend-core/src/api/attachments.js @@ -88,5 +88,18 @@ export const buildAttachmentEndpoints = API => { }, }) }, + + /** + * Download an attachment from a row given its column name. + * @param tableId + * @param rowId + * @param columnName the attachments to delete + */ + downloadAttachment: async (tableId, rowId, columnName) => { + return await API.get({ + url: `/api/${tableId}/rows/${rowId}/attachment/${columnName}`, + parseResponse: response => response, + }) + }, } }