Skip to main content
Solved

Get an expiring url from an attachment cell value


Hello!

Is there a way to get a public expiring url of an attacement through a script?

I use this code to get the cell value: 

let aTable = base.getTable("Table Name");

let queryResult = await aTable.selectRecordsAsync({fields: [aTable.getField("Attachment field")]});
 
for (let recordInd = 0; recordInd < queryResult.records.length; recordInd++)
{
     let attachmentCellValue = queryResult.records[recordInd].getCellValue('Attachment field)
}

//attachmentCellValue.url is a private url and I would like to get it as a public expiring url


Thanks!

Best answer by Sho

It appears that the automation scripting has not yet implemented the expired URL.

Since we can get the expired URL from the field, how about generating a list of record IDs that you need and process them in the repeating group?

View original
Did this topic help you find an answer to your question?

2 replies

  • Inspiring
  • 560 replies
  • Answer
  • December 7, 2023

It appears that the automation scripting has not yet implemented the expired URL.

Since we can get the expired URL from the field, how about generating a list of record IDs that you need and process them in the repeating group?


  • Author
  • Participating Frequently
  • 7 replies
  • December 7, 2023

Thank you @Sho !

That's a great workaround, initially I wanted a json string containing some list of expiring download urls. But I can manage also with a repeating group. 

I truly appreciate your help.


Reply