Mendeley import: Set contentType for PDFs
This commit is contained in:
parent
3af4793f7f
commit
c16432b217
1 changed files with 9 additions and 0 deletions
|
@ -136,6 +136,15 @@ Zotero_Import_Mendeley.prototype.translate = async function (options = {}) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set content type for PDFs
|
||||||
|
if (docFiles) {
|
||||||
|
docFiles.forEach((file) => {
|
||||||
|
if (file.fileURL.endsWith('.pdf')) {
|
||||||
|
file.contentType = 'application/pdf';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Save each document with its attributes
|
// Save each document with its attributes
|
||||||
let itemJSON = await this._documentToAPIJSON(
|
let itemJSON = await this._documentToAPIJSON(
|
||||||
map,
|
map,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue