zoukankan      html  css  js  c++  java
  • 使用fetch实现二进制数据流的pdf预览

        fetch(url, {
          method: "POST",
          body: JSON.stringify({
            'id': brId
          })
        }).then(ret => ret.blob())
          .then(res => {
            var blob = new Blob([res], {
              type: 'application/pdf;chartset=UTF-8'
            })
            var fileURL = URL.createObjectURL(blob)
            window.open(fileURL)
          })
  • 相关阅读:
    woj 1574
    UESTC 594 我要长高 dp单调队列
    HDU 3401 Trade dp 单调队列优化
    HDU 2844 Coins 多重背包
    2-1
    1-2
    1-1
    12-1
    9-1
    14-8
  • 原文地址:https://www.cnblogs.com/Angiy/p/15157848.html
Copyright © 2011-2022 走看看