Fetch a file's bytes with the Bearer credential attached. Use this (not * getFileUrl) when the bytes feed a / src: the browser loads * those natively without the Authorization header, so the URL alone 401s.
(fileId: string)
| 1234 | * getFileUrl) when the bytes feed a <video>/<img> src: the browser loads |
| 1235 | * those natively without the Authorization header, so the URL alone 401s. */ |
| 1236 | async getFileBlob(fileId: string): Promise<Blob> { |
| 1237 | return this.http.getBlob(`/files/${encodeURIComponent(fileId)}`); |
| 1238 | } |
| 1239 | |
| 1240 | // ------------------------------------------------------------------------- |
| 1241 | // WebSocket events |