shareFile

To return an URL of a specific file

Use this function to create a link to share an image or an attachment per script.

The shareFile function generates a share link that is only valid within the database in which it was created. If a backup of that database is restored and the original database is deleted, the share link will no longer display the file. The link becomes invalid as it references the original database that no longer exists.

This function doesn't work in a formula field because it's modifying data.

This function will return a link, which can be saved in a URL or text field.

Syntax

shareFile(file)

shareFile(nid, string)

Return

link

Examples

shareFile(myFile) To return a URL of a specific file.

shareFile(Logo)

Result: https://share.ninox.com/o7usi36shzk8hietrxcoje4n0g6sa6nf0335

shareFile(record, filename) To return a URL of a specific file, i.e. image, document, or a signature field.

shareFile(this, "NinoxLogo.jpg")

Result: https://share.ninox.com/o7usi36shzk8hietrxcoje4n0g6sa6nf0335

See also

unshareFile, which unshared a given file.

Last updated