Increase size of page logged for invalid PDF download
This commit is contained in:
parent
ff798d332b
commit
5f9dc05956
|
@ -337,7 +337,7 @@ Zotero.Attachments = new function(){
|
||||||
Zotero.Utilities.Internal.saveURI(wbp, nsIURL, tmpFile);
|
Zotero.Utilities.Internal.saveURI(wbp, nsIURL, tmpFile);
|
||||||
|
|
||||||
yield deferred.promise;
|
yield deferred.promise;
|
||||||
let sample = yield Zotero.File.getSample(tmpFile);
|
let sample = yield Zotero.File.getContentsAsync(tmpFile, null, 1000);
|
||||||
try {
|
try {
|
||||||
if (contentType == 'application/pdf' &&
|
if (contentType == 'application/pdf' &&
|
||||||
Zotero.MIME.sniffForMIMEType(sample) != 'application/pdf') {
|
Zotero.MIME.sniffForMIMEType(sample) != 'application/pdf') {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user