Read 200 bytes instead of 128 in Zotero.File.getSample()
This allows Zotero to detect PDFs with more gibberish at the beginning. https://forums.zotero.org/discussion/32550
This commit is contained in:
parent
1089856622
commit
52b95bfc03
2 changed files with 3 additions and 3 deletions
|
@ -83,10 +83,10 @@ Zotero.File = new function(){
|
|||
|
||||
|
||||
/*
|
||||
* Get the first 128 bytes of the file as a string (multibyte-safe)
|
||||
* Get the first 200 bytes of the file as a string (multibyte-safe)
|
||||
*/
|
||||
function getSample(file) {
|
||||
return this.getContents(file, null, 128);
|
||||
return this.getContents(file, null, 200);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -233,7 +233,7 @@ Zotero.MIME = new function(){
|
|||
}
|
||||
}
|
||||
// Otherwise allow match anywhere in sample
|
||||
// (128 bytes from getSample() by default)
|
||||
// (200 bytes from getSample() by default)
|
||||
else if (str.indexOf(_snifferEntries[i][0]) != -1) {
|
||||
match = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue