FileSource
Copy as MarkdownFileSource =
string|URL|Blob|ArrayBuffer|ArrayBufferView|Response|RupaFile
What a load can be given:
- a URL (
stringorURL): fetched, with credentials only to the page’s own origin (credentials: "same-origin"); from another origin the server must allow it (CORS); - the file’s bytes: a
Blob(aFilefrom an<input type="file">), anArrayBufferor a view of one; - a
Response(from your ownfetch), whose body is read; - a
RupaFilealready parsed (validated again; anintegritycannot be checked on it).
Example
Section titled “Example”await loadFile("/animations/hero.rupaplay");await loadFile(new URL("./hero.rupaplay", import.meta.url));await loadFile(input.files![0]!);