mirror of
https://github.com/thelounge/thelounge.git
synced 2024-06-18 13:35:10 +02:00
Change minimumBytes in file-type
This commit is contained in:
parent
4d5f15b32e
commit
87c9abe9da
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue