Change some instances of attachmentMIMEType to attachmentContentType
This commit is contained in:
parent
b109279a17
commit
82d00a4e7a
2 changed files with 6 additions and 6 deletions
|
@ -507,9 +507,9 @@ var Zotero_LocateMenu = new function() {
|
|||
var path = yield attachment.getFilePathAsync();
|
||||
if (path) {
|
||||
var ext = Zotero.File.getExtension(Zotero.File.pathToFile(path));
|
||||
if(!attachment.attachmentMIMEType ||
|
||||
Zotero.MIME.hasNativeHandler(attachment.attachmentMIMEType, ext) ||
|
||||
!Zotero.MIME.hasInternalHandler(attachment.attachmentMIMEType, ext)) {
|
||||
if(!attachment.attachmentContentType ||
|
||||
Zotero.MIME.hasNativeHandler(attachment.attachmentContentType, ext) ||
|
||||
!Zotero.MIME.hasInternalHandler(attachment.attachmentContentType, ext)) {
|
||||
return false;
|
||||
}
|
||||
return attachment;
|
||||
|
|
|
@ -64,10 +64,10 @@ Zotero.Annotate = new function() {
|
|||
if (m) {
|
||||
var id = m[1];
|
||||
var item = Zotero.Items.get(id);
|
||||
var mimeType = item.attachmentMIMEType;
|
||||
var file = item.getFile();
|
||||
var contentType = item.attachmentContentType;
|
||||
var file = item.getFilePath();
|
||||
var ext = Zotero.File.getExtension(file);
|
||||
if (mimeType == 'text/plain' || !Zotero.MIME.hasNativeHandler(mimeType, ext)) {
|
||||
if (contentType == 'text/plain' || !Zotero.MIME.hasNativeHandler(contentType, ext)) {
|
||||
return false;
|
||||
}
|
||||
return id;
|
||||
|
|
Loading…
Reference in a new issue