Skip to content
This repository has been archived by the owner on May 8, 2021. It is now read-only.

Commit

Permalink
Fixed #53 转换后的blob对象过小,导致图片不完整 感谢@jcs12311
Browse files Browse the repository at this point in the history
  • Loading branch information
think2011 committed Nov 16, 2015
1 parent 7ab21b1 commit 5b46bfa
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lrz",
"version": "4.6.24",
"version": "4.6.25",
"homepage": "https://github.com/think2011/localResizeIMG",
"authors": [
"think2011 <452125301@qq.com>"
Expand Down
2 changes: 1 addition & 1 deletion dist/lrz.all.bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/lrz.all.bundle.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/lrz.bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/lrz.bundle.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lrz",
"version": "4.6.24",
"version": "4.6.25",
"description": "前端本地客户端压缩图片,兼容IOS,Android,PC、自动按需加载文件",
"scripts": {
"test": "node ./node_modules/karma/bin/karma start"
Expand Down
2 changes: 1 addition & 1 deletion src/lrz.js
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ function dataURItoBlob (dataURI) {
ia[i] = byteString.charCodeAt(i);
}

return new BlobFormDataShim.Blob([ia], {type: mimeString});
return new BlobFormDataShim.Blob([ia.buffer], {type: mimeString});
}

window.lrz = function (file, opts) {
Expand Down
4 changes: 2 additions & 2 deletions test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ <h3>旋转方向测试</h3>
</footer>


<script src="../dist/lrz.bundle.js?v=ecd6d8e"></script>
<script src="./index.js?v=4fd412b"></script>
<script src="../dist/lrz.bundle.js?v=2eb91a3"></script>
<script src="./index.js?v=d0de898"></script>
</body>
</html>

0 comments on commit 5b46bfa

Please sign in to comment.