Fix Zotero.HTTP.download() for fx115

Blob#bytes() was introduced in fx128.
This commit is contained in:
Dan Stillman 2025-03-12 23:23:52 -04:00
parent 4b78b2c130
commit 0542010659

View file

@ -603,7 +603,9 @@ Zotero.HTTP = new function() {
noMock: true
}
);
var bytes = await IOUtils.write(path, await req.response.bytes());
var bytes = new Uint8Array(await req.response.arrayBuffer());
await IOUtils.write(path, bytes);
Zotero.debug(`Saved file to ${path} (${bytes} byte${bytes != 1 ? 's' : ''})`);
return req;
};