Get the URL of a file attached to a row

Is there a way to get the URL of a file that is attached to a row?

By way of example, if an arbitrary PDF file is attached, what is the url that results in previewing the file in a browser tab?

In general this seems to be an https://s3.amazonaws.com/ storage location.

For Arbitrary file.pdf in the image below (this link will of course not work because I have obfuscated it)

https://s3.amazonaws.com/SmartsheetB1/redacted?response-content-disposition=inline%3Bfilename%3D%22Arbitrary+file.pdf%22%3Bfilename*%3DUTF-8%27%27Arbitrary%2520file.pdf&Signature=redacted%2Bw%3D&Expires=1604007052&AWSAccessKeyId=redacted

I do not want the 30-day download url.

I want the permanent url.

Solution that works directly in a sheet is preferred. API solution would be ok as a secondary.


Answers