previewUrl

previewUrl, function

def pure previewUrl(hash: text, path: text): text

Returns a URL that opens a preview page for the file identified by hash. The path argument is informational, but its extension must match the file type (for example, .csv or .ion).

Example

hash = "0123456789abcdef"
url = previewUrl(hash, "/data/items.csv")
show scalar "Preview url" with url

Remarks

This function requires a valid file hash from the Lokad file storage, and it cannot be executed on try.lokad.com.

See also

User Contributed Notes
0 notes + add a note