Attachment Simple URL

"import urllib.parse

subdomain = “docs”
doc_id = “XXX”

urls =
for i in range(len($ColumnID.id)):
attachment_id = $ColumnID.id[i]
filename = $Pics.fileName[i] # Assuming the column is named ‘fileName’

# URL-encode the filename to handle special characters
encoded_filename = urllib.parse.quote(filename)

# Construct the URL with the encoded filename as a query parameter
url = f"https://{subdomain}.getgrist.com/api/docs/{doc_id}/attachments/{attachment_id}/download?attFilename={encoded_filename}"
urls.append(url)

return “,”.join(urls)"

Using this code I am getting Query String URLs. Is there any possibility to get simple URLs like “https://example.com/docID/attachement/logo.png?” My CMS(Wordpress) does not allows Query String URLs hence it is getting problem for us.

Hi @asif_raeen !

It is not currently possible to include the attachment file name and extension in the URL. This is a great idea for a future improvement and I have shared it with the team :+1:

Thanks,
Natalie