Matterway
    Preparing search index...

    Function mwFileFromUrl

    • Experimental

      Reads a file from a URL and returns an MwFile object that contains the file data and metadata.

      Parameters

      • ctx: Context

        The Matterway SDK context.

      • url: string

        The URL of the file to be read.

      Returns Promise<MwFile>

      An MwFile object that contains the file data and metadata.

      const fileUrl = 'https://example.com/files/example.pdf';
      const file = await mwFileFromUrl(context, fileUrl);
      // Now you can use the `file` object as needed.