(compression?: 'gzip' | 'deflate' | 'deflate-raw')
| 17 | } |
| 18 | |
| 19 | const sendFile = async (compression?: 'gzip' | 'deflate' | 'deflate-raw') => { |
| 20 | if (!file) { |
| 21 | return |
| 22 | } |
| 23 | const body = compression ? file.stream().pipeThrough(new CompressionStream(compression)) : file |
| 24 | |
| 25 | await fetch(`http://${BASE_URL}:3002/upload`, { |
| 26 | method: 'POST', |
| 27 | body, |
| 28 | }) |
| 29 | } |
| 30 | |
| 31 | const logContents = async () => { |
| 32 | for await (const chunk of file!.stream()) { |
no test coverage detected