mirror of
https://github.com/h2non/filetype.git
synced 2026-04-22 23:17:07 +08:00
add fixtures, but MatchReader may not work for some msooxml files, 4096 bytes maybe not enough
This commit is contained in:
@@ -51,7 +51,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, 512)
|
||||
buffer := make([]byte, 4096) // 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