Return itemID from linkFromURL() when it doesn't have to do a HEAD request; true otherwise
This commit is contained in:
parent
3919594834
commit
c6ae132bd3
|
@ -229,9 +229,8 @@ Zotero.Attachments = new function(){
|
||||||
|
|
||||||
// If we have the title and mime type, skip loading
|
// If we have the title and mime type, skip loading
|
||||||
if (title && mimeType){
|
if (title && mimeType){
|
||||||
_addToDB(null, url, title, this.LINK_MODE_LINKED_URL, mimeType,
|
return _addToDB(null, url, title, this.LINK_MODE_LINKED_URL, mimeType,
|
||||||
null, sourceItemID);
|
null, sourceItemID);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Otherwise do a head request for the mime type
|
// Otherwise do a head request for the mime type
|
||||||
|
@ -239,6 +238,8 @@ Zotero.Attachments = new function(){
|
||||||
_addToDB(null, url, title, Zotero.Attachments.LINK_MODE_LINKED_URL,
|
_addToDB(null, url, title, Zotero.Attachments.LINK_MODE_LINKED_URL,
|
||||||
obj.channel.contentType, null, sourceItemID);
|
obj.channel.contentType, null, sourceItemID);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user