mirror of
https://github.com/zotero/zotero.git
synced 2026-10-04 02:31:47 +00:00
fx-compat: Fix _getExtensionFromURL()
This commit is contained in:
parent
300af4477f
commit
87decd0f8d
1 changed files with 2 additions and 3 deletions
|
|
@ -2842,9 +2842,8 @@ Zotero.Attachments = new function(){
|
|||
|
||||
|
||||
this._getExtensionFromURL = function(url, contentType) {
|
||||
var nsIURL = Components.classes["@mozilla.org/network/standard-url;1"]
|
||||
.createInstance(Components.interfaces.nsIURL);
|
||||
nsIURL.spec = url;
|
||||
var nsIURL = Services.io.newURI(url)
|
||||
.QueryInterface(Ci.nsIURL);
|
||||
return Zotero.MIME.getPrimaryExtension(contentType, nsIURL.fileExtension);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue