Open blob objectURL in Chrome

后端 未结 6 1579
挽巷
挽巷 2020-12-24 06:22

I want to open a PDF in a new tab in chrome browser (Chrome 56.0.2924.87, Ubuntu 14.04) using window.open(fileObjectURL) in javascript. I am creating the blob f

6条回答
  •  有刺的猬
    2020-12-24 07:16

    I do not have Ad blocker. Looks like setting the blob type explicitly to application/pdf will solve this issue.

    const newBlob = new Blob([blobData], {type: "application/pdf"});

提交回复
热议问题