Skip to content

Commit

Permalink
fix(taro-h5): 修复chooseImage生成的blob对象缺少类型的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Littly committed Aug 8, 2019
1 parent 2e25f97 commit b31fdc0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/taro-h5/src/api/image/chooseImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ const chooseImage = function (options) {
taroChooseImageId.onchange = function (e) {
let arr = [...e.target.files]
arr && arr.forEach(item => {
let blob = new Blob([item])
let blob = new Blob([item], {
type: item.type
})
let url = URL.createObjectURL(blob)
res.tempFilePaths.push(url)
res.tempFiles.push({path: url, size: item.size, type: item.type})
Expand Down

0 comments on commit b31fdc0

Please sign in to comment.