From 054201065973c4b9b7dbc03ed1bd53bb0777f26c Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 12 Mar 2025 23:23:52 -0400 Subject: [PATCH] Fix `Zotero.HTTP.download()` for fx115 Blob#bytes() was introduced in fx128. --- chrome/content/zotero/xpcom/http.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/http.js b/chrome/content/zotero/xpcom/http.js index e8b0b13fc8..fb0d77f740 100644 --- a/chrome/content/zotero/xpcom/http.js +++ b/chrome/content/zotero/xpcom/http.js @@ -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; };