Feb 04, 2019 07:58 AM
Background.
I have Valuations field in my Airtable DB. It’s type is set to “Attachment” and it stores PDFs. I populate it manually.
Script.
I’ve got a VBA-script with embedded CURL-commands that works as follows:
Problem.
Despite the fact that I have recorded the JSONs of each attachment in “Valuations” I get #422 Error whenever I launch my CURL to create an updated record containing attachments in “Valuations”. Please, have a look at the JSON below. Any advice will be highly appreciated.
“Valuations”:[
{
“id”:“attGR7hW7A3jnIczu”,
“url”:“URL…pdf”,
“filename”:“Valuation-Workbook_3284-3286-Sullivant-Ave-Columbus-OH-43204_2018-12-27-11-11-09 (1).pdf”,
“size”:8244890,
“type”:“application/pdf”,
“thumbnails”:{
“small”:{
“url”:“URL…pdf”,
“width”:36,
“height”:36},
“large”:{
“url”:“URL…pdf”,
“width”:512,
“height”:512}
}
}
]
Feb 05, 2019 03:29 PM
Me too, please anyone HELP!
Feb 06, 2019 12:34 AM
Try using only the “url” and “filename” parameter.
Perhaps the size, width, height etc are not matching up with Airtable’s calculation of said file…not sure though.
Are you able to directly update/create the record via curl on your terminal?
Feb 07, 2019 01:04 PM
Airtable needs your files to be hosted on a webserver. So you cannot use a url that is from your filesystem. Where are the files hosted?
Apr 19, 2019 01:57 AM
Thank you guys for sharing your expertise!
I have investigated this situation and was able to find the following:
NB! Example of a direct URL of a file that is stored on OneDrive:dl.airtable.com/.attachments/33aba36f77e45410fa589284f0231667/e27bd864/y4mQyjZyCPxzkFRz_OraavmULDtK8ok4c-WK3ee-NmcpKU0Z4C_Y3rqiD1QvuOyNJOiKQPrF1aMxc6lKNBp6mKKsq-s9w0DdQsHKoPuP1a2E4dDvjhAx9n30h9mHMGWZwj7JGNUuFSpzTYMpQ0QBa0tdsJObbxwD21B33gPHUX47kdXJOvHp8A_zEC9NJ88kuXqzwY842WJi9YMzE3Gl-3gSBc2zhs8CSWSVjDJaGrdeVk