From 87c9abe9da10886ab51fbf1267ccca20519f91cc Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Thu, 6 Feb 2020 12:41:43 +0200 Subject: [PATCH] Change minimumBytes in file-type --- src/plugins/uploader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/uploader.js b/src/plugins/uploader.js index ad4070e4..0c2242c3 100644 --- a/src/plugins/uploader.js +++ b/src/plugins/uploader.js @@ -234,7 +234,7 @@ class Uploader { // Returns a string with the type otherwise static async getFileType(filePath) { try { - const buffer = readChunk.sync(filePath, 0, fileType.minimumBytes); + const buffer = await readChunk(filePath, 0, 5120); // returns {ext, mime} if found, null if not. const file = await fileType.fromBuffer(buffer);