@backblaze-labs/b2-sdk - v0.2.0
    Preparing search index...

    Function presignGetObjectUrl

    • Returns a B2-native download-authorization URL, not an S3 presigned URL.

      This deprecated helper preserves the legacy positional output contract where the whole file name is encoded as one URL component, including / as %2F. It keeps the legacy string-building contract for callers that relied on custom/local download URLs or permissive inputs. Use createNativeDownloadAuthorizationUrl for strict validation.

      Parameters

      • downloadUrl: string

        The B2 download URL from authorization.

      • bucketName: string

        The bucket containing the file.

      • fileName: string

        The file name (path) to download.

      • authorizationToken: string

        A download authorization token from b2_get_download_authorization.

      • OptionalvalidDurationInSeconds: number

        Compatibility-only value for the non-authoritative expires query.

      Returns string

      The B2 native download-authorization URL string.

      Use createNativeDownloadAuthorizationUrl for B2 native download-token URLs, or presignS3GetObjectUrl for real S3-compatible AWS Signature Version 4 presigned GET URLs.