Fixes #196, Error: Scholar.File.getMIMETypeFromFile is not a function (line 1957) when adding new files
My bad
This commit is contained in:
parent
6a994a25a2
commit
bfbea6474e
1 changed files with 2 additions and 2 deletions
|
@ -1954,7 +1954,7 @@ Scholar.Attachments = new function(){
|
||||||
newFile.initWithFile(destDir);
|
newFile.initWithFile(destDir);
|
||||||
newFile.append(title);
|
newFile.append(title);
|
||||||
|
|
||||||
var mimeType = Scholar.File.getMIMETypeFromFile(newFile);
|
var mimeType = Scholar.MIME.getMIMETypeFromFile(newFile);
|
||||||
var charsetID = _getCharsetIDFromFile(newFile);
|
var charsetID = _getCharsetIDFromFile(newFile);
|
||||||
|
|
||||||
_addToDB(newFile, null, null, this.LINK_MODE_IMPORTED_FILE,
|
_addToDB(newFile, null, null, this.LINK_MODE_IMPORTED_FILE,
|
||||||
|
@ -1982,7 +1982,7 @@ Scholar.Attachments = new function(){
|
||||||
|
|
||||||
function linkFromFile(file, sourceItemID){
|
function linkFromFile(file, sourceItemID){
|
||||||
var title = file.leafName;
|
var title = file.leafName;
|
||||||
var mimeType = Scholar.File.getMIMETypeFromFile(file);
|
var mimeType = Scholar.MIME.getMIMETypeFromFile(file);
|
||||||
var charsetID = _getCharsetIDFromFile(file);
|
var charsetID = _getCharsetIDFromFile(file);
|
||||||
return _addToDB(file, null, title, this.LINK_MODE_LINKED_FILE, mimeType, charsetID, sourceItemID);
|
return _addToDB(file, null, title, this.LINK_MODE_LINKED_FILE, mimeType, charsetID, sourceItemID);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue