Reads a file from a URL and returns an SdkFile object that contains the file data and metadata.
SdkFile
The Matterway SDK context.
The URL of the file to be read.
An SdkFile object that contains the file data and metadata.
const fileUrl = 'https://example.com/files/example.pdf';const file = await fileFromUrl(context, fileUrl);// Now you can use the `file` object as needed. Copy
const fileUrl = 'https://example.com/files/example.pdf';const file = await fileFromUrl(context, fileUrl);// Now you can use the `file` object as needed.
Reads a file from a URL and returns an
SdkFile
object that contains the file data and metadata.