Mendeley importer: Sniff for mime-type if octet-stream
reported. #3454
This commit is contained in:
parent
4d05367f1d
commit
b9de90c485
1 changed files with 1 additions and 1 deletions
|
@ -1627,7 +1627,7 @@ Zotero_Import_Mendeley.prototype._saveAnnotations = async function (annotations,
|
|||
if (file) {
|
||||
// Fix blank PDF attachment MIME type from previous imports
|
||||
let type = 'application/pdf';
|
||||
if (!attachmentItem.attachmentContentType) {
|
||||
if (!attachmentItem.attachmentContentType || attachmentItem.attachmentContentType === 'application/octet-stream') {
|
||||
if (Zotero.MIME.sniffForMIMEType(await Zotero.File.getSample(file)) == type) {
|
||||
attachmentItem.attachmentContentType = type;
|
||||
await attachmentItem.saveTx(this._saveOptions);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue