ReadonlymimeMIME type advertised to the receiver; defaults to application/octet-stream when unknown.
ReadonlynameFile name advertised to the receiver in the transfer offer.
ReadonlysizeTotal size of the file in bytes.
OptionalcloseRelease any resources (e.g. an open file handle) held by the source. Called when the transfer ends.
Read a contiguous range of bytes.
Byte offset at which to start reading.
Maximum number of bytes to read; the returned buffer may be shorter at end-of-file.
The requested bytes.
Read-only, random-access source of the bytes being sent in a transfer.
The send pipeline reads the file in chunks via FileSource.slice, so an implementation need not hold the whole file in memory. Built-in implementations include BlobFileSource (browser) and
NodeFileSource(Node).