We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 07437e6 commit a32b8fdCopy full SHA for a32b8fd
src/utils/blob.js
@@ -2,6 +2,7 @@ export async function download(url) {
2
const response = await fetch(url, { mode: 'cors' })
3
const reader = response.body.getReader()
4
const contentLength = +response.headers.get('Content-Length')
5
+ const contentEncoding = response.headers.get('Content-Encoding')
6
console.debug('[blob] Downloading', url, contentLength)
7
8
const chunks = []
@@ -13,7 +14,7 @@ export async function download(url) {
13
14
15
const blob = new Blob(chunks)
16
console.debug('[blob] Downloaded', url, blob.size)
- if (blob.size !== contentLength) console.warn('[blob] Download size mismatch', {
17
+ if (!contentEncoding && blob.size !== contentLength) console.warn('[blob] Download size mismatch', {
18
url,
19
expected: contentLength,
20
actual: blob.size,
0 commit comments