Creates an instance of TelaFile.
The source of the file. Can be a URL string, Uint8Array, ReadableStream, ReadStream, Blob, or File.
Optionaloptions: BaseTelaFileOptionsOptional configuration options such as byte range.
Determines whether the file source is a valid URL.
true if the file source is a valid URL string, otherwise false.
Determines whether the file source is a valid Vault reference.
true if the file source is a valid Vault reference, otherwise false.
Gets the name of the file.
The name of the file if available, otherwise null.
Retrieves the options provided during instantiation.
The TelaFileOptions or an empty object if none were provided.
Gets the size of the file in bytes.
The size of the file if available, otherwise null.
Gets the type of the file.
The type of the file if available, otherwise null.
Retrieves the content of the file in a format suitable for uploading.
Uint8Array, it converts it to a File object.ReadStream or ReadableStream, it calculates the size and returns a stream.A promise that resolves to the uploadable content.
StaticcreateOptionaloptions: BaseTelaFileOptions
Represents a file with support for various types including URLs, binary data, streams, and Blobs.
Example