Skip to content

$fn.getPresignedUrl(path,options)

Issues a signed URL to access a file manager in the WebPerformerNX execution environment. "asynchronous"

Argument

NameTypeDescription
pathstring
  • File path of the file manager issuing the signed URL
  • Support for the following query parameter
  • Query ParameterDescription
    response-content-typeOverride Content-type in response headers
    If not specified, binary/octet-stream is set
    response-cache-controlOverride Cache-control in response headers
    optionsobjectSigned URL validity time

    Options Details

    PropertyTypeDescription
    expiresInnumberValidity time of signed URL (seconds)
    Default is 900

    Return value

    TypeDescription
    StringSigned URL

    Sample

    // Query parameter (cache:don't save, MIME type:application/pdf) specified in file path
    const path = $ui.filePath.value + "\?response-cache-control=no-store&response-content-type=application/pdf";
    // Issuing a signed URL with a validity time of 10 minutes
    $ui.url.value = await $fn.getPresignedUrl(path, {expiresIn:600});