mirror of
https://github.com/h2non/filetype.git
synced 2026-04-22 23:17:07 +08:00
Bump buffer size to 8K to allow for more custom file matching
This commit is contained in:
@@ -53,7 +53,7 @@ func MatchFile(filepath string) (types.Type, error) {
|
||||
|
||||
// MatchReader is convenient wrapper to Match() any Reader
|
||||
func MatchReader(reader io.Reader) (types.Type, error) {
|
||||
buffer := make([]byte, 4096) // just make msooxml test happy, but 4096 bytes maybe not enough to determine the real type
|
||||
buffer := make([]byte, 8192) // just make msooxml test happy, but 4096 bytes maybe not enough to determine the real type
|
||||
|
||||
_, err := reader.Read(buffer)
|
||||
if err != nil && err != io.EOF {
|
||||
|
||||
Reference in New Issue
Block a user