downloadUrl

downloadUrl(path: text) 🡒 text, pure function

Produces an URL that downloads the file at the specified path in the Lokad file explorer.

Typical uses include: downloading data files, downloading PDF documents, or linking to images for display in show label.

show label (downloadUrl("/images/smiley.png")) 

If the user does not have permission to view the provided path, it is likely that they will not be able to download the file.

The file must be present in the Lokad file explorer at the time when the URL is visited, and it will always download the file present at that instant in time.

This function cannot be called on try.lokad.com.

downloadUrl(hash: text, name: text) 🡒 text, pure function

Produces an URL that downloads the file with the specified hash, using the provided name.

Typical uses include: downloading data files, downloading PDF documents, or linking to images for display in show label.

show label (downloadUrl("4F7259333A6795C13F1AD9E900DAA7FE", "smiley.png")) 

Differences with the downloadUrl(path) version:

This function cannot be called on try.lokad.com.

See also

User Contributed Notes
0 notes + add a note