Add download attachments api

This commit is contained in:
Adria Navarro 2024-04-02 11:12:55 +02:00
parent 6138f42b7d
commit 94eefb8007
1 changed files with 13 additions and 0 deletions

View File

@ -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,
})
},
}
}