Self-explanatory title
I have URLs for images that I would like to attach in the Grist records (not just the URL of it).
Seems I’m missing a trick here and couldn’t find anything searching this forum.
If an attachment is not referenced by any cell, it will be deleted automatically after some time. If you need to delete it immediately, there’s an undocumented endpoint: POST /api/docs/{doc_id}/attachments/removeUnused. Use it with caution.
@alexmojaki Thank you for this help and it would be great to add it on API reference documentation (payload sample for instance):
#add records to table with attachment:
POST /api/docs/{docId}/tables/{tableId}/records
# sample payload:
{"records": [{ "fields": { "file": ["L", attachment_id] }}]