Mendeley import: Set contentType for PDFs

This commit is contained in:
Dan Stillman 2021-03-08 08:58:26 -05:00
parent 3af4793f7f
commit c16432b217

View file

@ -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
let itemJSON = await this._documentToAPIJSON(
map,