camsong / fetch-ie8

A window.fetch JavaScript polyfill supporting IE8
MIT License
279 stars 33 forks source link

ie8 does not support FileReader, I have got resource from servers with blob, so how to deal with it?thanks #10

Open mandysayyes opened 7 years ago

mandysayyes commented 7 years ago

function option(options){ return { ...options, credentials : 'include' } }

function imgFetch(url,options=null){ const optionsConfig = option(optiobs); return fetch(url,optionConfig) .then((res)=>{return res.blob()}) .then((res)=>{return URL.createObjectURL(res)}) }