# FileSource

> **FileSource** = `string` | `URL` | `Blob` | `ArrayBuffer` | `ArrayBufferView` | `Response` | [`RupaFile`](/reference/api/rupamotion/player/file/interfaces/rupafile/)

What a load can be given:

- a URL (`string` or `URL`): 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` (a `File` from an `<input type="file">`), an `ArrayBuffer` or a view of one;
- a `Response` (from your own `fetch`), whose body is read;
- a `RupaFile` already parsed (validated again; an `integrity` cannot be checked on it).

## Example

```ts
await loadFile("/animations/hero.rupaplay");
await loadFile(new URL("./hero.rupaplay", import.meta.url));
await loadFile(input.files![0]!);
```
