Skip to main content
Version: Current

File Types

  • RecordFileRequest​

    Defines an interface that is used for requests to record a file.

    Members​

    • fileByteLength number​

      The number of bytes in the file.

    • fileDescription string​

      The description of the file.

    • fileExtension? string​

      The file extension to use for the uploaded file. If specified, this will be used as the file extension instead of deriving one from the MIME type. Should include the leading dot (e.g. '.spz', '.png'). If both fileExtension and fileMimeType are provided, the server will validate that the known extension for the MIME type matches the specified extension.

    • fileMimeType? string​

      The MIME type of the file.

    • fileSha256Hex string​

      The hex encoded SHA256 hash of the file that will be uploaded.

    • headers object​

      The headers that were included in the result.

    • instances? string[]​

      The instances that are currently loaded.

    • markers? string[]​

      The markers that should be applied to the file.

    • userRole? UserRole​

      The role of the user that is making the request.

  • RecordFileResult​

    Defines the possible results of a "record file" request.

    A RecordFileResult can be one of the following values:

  • RecordFileSuccess​

    Defines an interface that represents a successful "record file" request.

    Members​

    • sha256Hash string​

      The SHA-256 hash of the file. When downloading the URL, the resulting data is guaranteed to have a SHA-256 hash that matches this value.

    • success true​

    • url string​

      The URL that the file can be accessed at.

  • RecordFileFailure​

    Defines an interface that represents a failed "record file" request.

    Members​

    • errorCode KnownErrorCodes​

      The error code that describes why the request failed.

    • errorMessage string​

      The error message that describes why the request failed.

    • existingFileUrl? string​

      The URL that the file is available at if it has already been uploaded.

    • success false​

  • EraseFileResult​

    Defines the possible results of a request to erase a file record.

    A EraseFileResult can be one of the following values:

  • EraseFileSuccess​

    Defines an interface that represents a successful request to erase a file record.

    Members​

    • fileName string​

      The name of the file that was erased.

    • recordName string​

      The name of the record that the file was erased from.

    • success true​

  • EraseFileFailure​

    Defines an interface that represents a failed request to erase a file record.

    Members​

    • errorCode ("not_logged_in" | "record_not_found" | "file_not_found" | "invalid_record_key" | "unacceptable_request" | "server_error" | "not_authorized" | "subscription_limit_reached" | "action_not_supported")​

      The error code that indicates why the request failed.

    • errorMessage string​

      The error message that indicates why the request failed.

    • success false​