diff --git a/src/loaders/FileLoader.js b/src/loaders/FileLoader.js index 1e528eb11fb19b..f89b3fd77a708d 100644 --- a/src/loaders/FileLoader.js +++ b/src/loaders/FileLoader.js @@ -112,7 +112,7 @@ class FileLoader extends Loader { // Nginx needs X-File-Size check // https://serverfault.com/questions/482875/why-does-nginx-remove-content-length-header-for-chunked-content - const contentLength = response.headers.get( 'Content-Length' ) || response.headers.get( 'X-File-Size' ); + const contentLength = response.headers.get( 'X-File-Size' ) || response.headers.get( 'Content-Length' ); const total = contentLength ? parseInt( contentLength ) : 0; const lengthComputable = total !== 0; let loaded = 0;