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

Commit

Permalink
Fixed 继续完善formDataShim(QQ X5浏览器兼😓)
Browse files Browse the repository at this point in the history
Updated 服务端演示更换为更快的国内空间
  • Loading branch information
think2011 committed Nov 18, 2015
1 parent 80048c3 commit db6e861
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 12 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.7.32",
"version": "4.7.35",
"homepage": "https://github.com/think2011/localResizeIMG",
"authors": [
"think2011 <[email protected]>"
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.

7 changes: 7 additions & 0 deletions dist/那么多文件,应该引用哪个?.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
1. 一般情况仅需引用 【lrz.bundle.js】 即可。
但绝对不要删除目录下的【*.chunk.js】,这些文件分别对应了IOS和Android的兼容代码,检测到符合环境时会自动引入。

2. 【lrz.all.bundle.js】是包含了所有引用了,莫名其妙的问题下就引用这个吧。
例如:https://github.com/think2011/localResizeIMG/issues/6

3. 【*.map】文件是供调试用的,正式使用删不删除都没关系,因为仅在调试时才会载入。
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.7.32",
"version": "4.7.35",
"description": "前端本地客户端压缩图片,兼容IOS,Android,PC、自动按需加载文件",
"scripts": {
"test": "node ./node_modules/karma/bin/karma start"
Expand Down
4 changes: 2 additions & 2 deletions src/lib/Blob.FormData.shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ function hasFormDataBug () {
&& ~navigator.vendor.indexOf('Google')
&& !~navigator.userAgent.indexOf('Chrome');

// QQ浏览器也有这个BUG
return bCheck && navigator.userAgent.match(/AppleWebKit\/(\d+)/).pop() <= 534 || /MQQBrowser/g.test(userAgent);
// QQ X5浏览器也有这个BUG
return bCheck && navigator.userAgent.match(/AppleWebKit\/(\d+)/).pop() <= 534 || /MQQBrowser/g.test(navigator.userAgent);
}
function FormDataShim () {
var
Expand Down
2 changes: 1 addition & 1 deletion test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ <h3>旋转方向测试</h3>
</footer>


<script src="../dist/lrz.bundle.js?v=c33f578"></script>
<script src="../dist/lrz.bundle.js?v=69f2c4b"></script>
<script src="./index.js?v=4fd412b"></script>
</body>
</html>
4 changes: 2 additions & 2 deletions test/server.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ <h3>旋转方向测试</h3>
</footer>


<script src="../dist/lrz.bundle.js?v=c33f578"></script>
<script src="./server.js?v=de5dc7e"></script>
<script src="../dist/lrz.bundle.js?v=69f2c4b"></script>
<script src="./server.js?v=a0cdab7"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion test/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ document.querySelector('input').addEventListener('change', function () {
// 原生ajax上传代码,所以看起来特别多 ╮(╯_╰)╭,但绝对能用
// 其他框架,例如ajax处理formData略有不同,请自行google,baidu。
var xhr = new XMLHttpRequest();
xhr.open('POST', 'http://koa-upload.herokuapp.com/');
xhr.open('POST', 'http://koa-upload.coding.io');

xhr.onload = function () {
var data = JSON.parse(xhr.response);
Expand Down

0 comments on commit db6e861

Please sign in to comment.