Don't do doHead if MIME type already set in Zotero.Attachments.linkFromURL()

This commit is contained in:
Dan Stillman 2008-05-13 18:46:15 +00:00
parent 898890eca3
commit db89785a8a

View File

@ -382,6 +382,7 @@ Zotero.Attachments = new function(){
Zotero.Notifier.enable(); Zotero.Notifier.enable();
} }
if (!mimeType) {
// If we don't have the MIME type, do a HEAD request for it // If we don't have the MIME type, do a HEAD request for it
Zotero.Utilities.HTTP.doHead(url, function(obj){ Zotero.Utilities.HTTP.doHead(url, function(obj){
var mimeType = obj.channel.contentType; var mimeType = obj.channel.contentType;
@ -393,6 +394,7 @@ Zotero.Attachments = new function(){
Zotero.Notifier.trigger('add', 'item', itemID); Zotero.Notifier.trigger('add', 'item', itemID);
}); });
}
return itemID; return itemID;
} }