Patch size limite of the filetype guesser

This commit is contained in:
Eric Coissac
2025-03-08 07:34:02 +01:00
parent 706b44c37f
commit 0339e4dffa
2 changed files with 2 additions and 1 deletions

View File

@ -107,6 +107,7 @@ func OBIMimeTypeGuesser(stream io.Reader) (*mimetype.MIME, io.Reader, error) {
mimetype.Lookup("application/octet-stream").Extend(csv, "text/csv", ".csv")
// Create a buffer to store the read data
mimetype.SetLimit(1024 * 1024)
buf := make([]byte, 1024*1024)
n, err := io.ReadFull(stream, buf)

View File

@ -8,7 +8,7 @@ import (
// corresponds to the last commit, and not the one when the file will be
// commited
var _Commit = "fbe7d15"
var _Commit = "706b44c"
var _Version = "Release 4.4.0"
// Version returns the version of the obitools package.