mirror of
https://github.com/zotero/zotero.git
synced 2026-09-28 01:31:40 +00:00
Update Connector Server tests (#5148)
This commit is contained in:
parent
69dcbda1a0
commit
2cd4ba205a
2 changed files with 717 additions and 1405 deletions
|
|
@ -214,13 +214,15 @@ Zotero.Translate.ItemSaver.prototype = {
|
|||
if (snapshotContent) {
|
||||
attachment.snapshotContent = snapshotContent;
|
||||
}
|
||||
new Promise(async (resolve, reject) => {
|
||||
await new Promise(async (resolve, reject) => {
|
||||
await this._saveAttachment(
|
||||
attachment,
|
||||
parentItemID,
|
||||
(attachment, progress, e) => {
|
||||
if (e) reject(e);
|
||||
resolve(progress);
|
||||
if (progress === 100) {
|
||||
resolve(progress);
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
|
|
@ -595,7 +597,7 @@ Zotero.Translate.ItemSaver.prototype = {
|
|||
newAttachment = yield this._saveAttachmentFile.apply(this, arguments);
|
||||
}
|
||||
else {
|
||||
Zotero.debug('Translate: Ignoring attachment due to ATTACHMENT_MODE_IGNORE');
|
||||
Zotero.debug(`Translate: Ignoring attachment ${attachment.title} due to ATTACHMENT_MODE_IGNORE`);
|
||||
}
|
||||
|
||||
if (!newAttachment) return false; // attachmentCallback should not have been called in this case
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue