@bzr/bazaar
    Preparing search index...

    Class FilesAPIBeta

    High-level files/blob storage API.

    Index

    Constructors

    Methods

    • Beta

      Download a file's binary content.

      Parameters

      • fileId: string
      • Optionaloptions: { onProgress?: OnProgress }

      Returns Promise<Blob>

    • Beta

      Get a URL for a file, for <img src>, <video src> and links, on the server holding it. Good for this user and app, for this file only, and only as long as they may read it.

      Parameters

      • fileId: string
      • Optionaloptions: { expiresIn?: number }

        expiresIn: seconds it's good for, at least (default 1 hour, at most 24). Repeat calls give the same URL for a while.

      Returns Promise<string>

    • Beta

      Replace the binary content of an existing file.

      Parameters

      • fileId: string
      • file: File | Blob
      • Optionaloptions: { onProgress?: OnProgress }

      Returns Promise<BazaarFile>

    • Beta

      Upload a new file.

      Parameters

      • file: File | Blob
      • Optionaloptions: {
            filename?: string;
            metadata?: FileMetadata;
            onProgress?: OnProgress;
            path?: string;
        }

      Returns Promise<BazaarFile>