diff --git a/package.json b/package.json index 532e3adb..382f1c1d 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "cheerio": "0.22.0", "commander": "2.19.0", "express": "4.16.4", - "file-type": "10.1.0", + "file-type": "10.4.0", "filenamify": "2.1.0", "fs-extra": "7.0.1", "irc-framework": "4.0.0", diff --git a/src/plugins/uploader.js b/src/plugins/uploader.js index 0dff113f..19528d8b 100644 --- a/src/plugins/uploader.js +++ b/src/plugins/uploader.js @@ -124,7 +124,7 @@ class Uploader { let type; try { - buffer = readChunk.sync(filePath, 0, 4100); + buffer = readChunk.sync(filePath, 0, fileType.minimumBytes); } catch (e) { if (e.code === "ENOENT") { // doesn't exist return; diff --git a/yarn.lock b/yarn.lock index ba4a40d3..4552f3ff 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2864,9 +2864,9 @@ file-entry-cache@^2.0.0: flat-cache "^1.2.1" object-assign "^4.0.1" -file-type@10.1.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/file-type/-/file-type-10.1.0.tgz#f692a28722e1ac8e206e68fcc2fb032a759d16d0" +file-type@10.4.0: + version "10.4.0" + resolved "https://registry.yarnpkg.com/file-type/-/file-type-10.4.0.tgz#e730e93ffdf30992c0b7d38fc2f15c4371353d44" filename-reserved-regex@^2.0.0: version "2.0.0"