Skip to main content
Function GetFileURL()

Generates a temporary direct URL to a file stored in Mapsly

Sergey Shurygin avatar
Written by Sergey Shurygin
Updated over 8 months ago

Use GetFileURL(fileId, ttl) to generate a direct link to a file that will be valid for the requested time period. Unlike GetFileProperties(fileId).file_url, to access which the user must be logged in to Mapsly, a link returned by GetFileURL() does not require authentication to access the file, which makes this function useful for generating temporary HTML content without embedding the file's binary content into it; for example, for inserting images into HTML form fields.

See Files in Mapsly for more details.

Input

  • fileId: ID of a file stored in a Files field of a Mapsly system object like Check In, or a Fiels field of a Form action.
    โ€‹

  • ttl: time period, in seconds, for which the returned link should be valid.

Output

A temporary direct URL to the requested file.

See also:

Did this answer your question?