.mhtml
file extension? Using the code below seems to always set it to .bin
extensionawait KeyValueStore.setValue("some-name", data, { contentType: `application/x-mimearchive` \\ multipart/related doesn't work either, }); // data above is either text or buffer
some-name.mhtml
// Inside the requestHandler const cdpSession = await page.target().createCDPSession(); await cdpSession.send('Page.enable'); const { data } = await cdpSession.send('Page.captureSnapshot', { format: 'mhtml' }); const key = `file-${Math.floor( Math.random() * 0xffffff ).toString(16)}.mhtml`; await KeyValueStore.setValue(key, data, { contentType: `multipart/related`, });