marinedup 5 months | flag

/// Returns its argument as-is. If the path is known at compile-time and points to /files, remembers that said file is referenced by this script.
[restricted]
map downloadUrl(fullpath: text) : text as "downloadurl(txt)"

/// Returns an URL for the file with the provided hash, to be downloaded as the provided name.
[restricted]
map downloadUrl(hash: text, name: text) : text as "downloadurl(txt,txt)"

/// Returns an URL for the folder at the provided path in /files, and (if known at compile-time) remembers that said folder is referenced by this script.
[restricted]
map filesUrl(path: text) : text as "filesurl(txt)"

marinedup 4 months | flag

As of 23/01/2024, filesUrl function is replaced by 2 functions:

/// Returns an URL for the file, identified by the hash, at the provided path in /files, and (if known at compile-time) remembers that said file is referenced by this script.
[restricted]
map fileUrl(hash: text, path: text) : text as "fileurl(txt,txt)"

/// Returns an URL for the folder at the provided path in /files, and (if known at compile-time) remembers that said folder is referenced by this script.
[restricted]
map folderUrl(path: text) : text as "folderurl(txt)"