{"action":"created","issue":{"url":"https://api.github.com/repos/ali-sdk/ali-oss/issues/98","repository_url":"https://api.github.com/repos/ali-sdk/ali-oss","labels_url":"https://api.github.com/repos/ali-sdk/ali-oss/issues/98/labels{/name}","comments_url":"https://api.github.com/repos/ali-sdk/ali-oss/issues/98/comments","events_url":"https://api.github.com/repos/ali-sdk/ali-oss/issues/98/events","html_url":"https://github.com/ali-sdk/ali-oss/issues/98","id":150769401,"number":98,"title":"浏览器端调用multipartUpload接口，配置progress回调时报错，不配置进度回调则没问题","user":{"login":"hui1hui2hui3","id":4636361,"avatar_url":"https://avatars.githubusercontent.com/u/4636361?v=3","gravatar_id":"","url":"https://api.github.com/users/hui1hui2hui3","html_url":"https://github.com/hui1hui2hui3","followers_url":"https://api.github.com/users/hui1hui2hui3/followers","following_url":"https://api.github.com/users/hui1hui2hui3/following{/other_user}","gists_url":"https://api.github.com/users/hui1hui2hui3/gists{/gist_id}","starred_url":"https://api.github.com/users/hui1hui2hui3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hui1hui2hui3/subscriptions","organizations_url":"https://api.github.com/users/hui1hui2hui3/orgs","repos_url":"https://api.github.com/users/hui1hui2hui3/repos","events_url":"https://api.github.com/users/hui1hui2hui3/events{/privacy}","received_events_url":"https://api.github.com/users/hui1hui2hui3/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-04-25T07:08:08Z","updated_at":"2016-05-04T04:53:02Z","closed_at":"2016-04-25T07:45:07Z","body":"出现版本：v4.3.0\r\n浏览器端调用multipartUpload接口，页面出现如下错误：\r\n`error TypeError: You may only yield a function, promise, generator, array, or object, but the following object was passed: \"undefined\"`\r\n页面调用方法如下：\r\n```\r\nossUpload = new OSS.Wrapper({\r\n                endpoint: 'https://xxxx',\r\n                accessKeyId: 'xxxxxxxxx'\r\n                accessKeySecret: 'xxxxxxxxxx',\r\n                cname: true\r\n            });\r\nossUpload.useBucket('xxx');\r\nossUpload.multipartUpload(file.name, file, {\r\n                progress: function(p, cpt){\r\n                    console.log(p);\r\n                    console.log(cpt);\r\n                }\r\n            }).then(function(res){\r\n                console.log('success', res);\r\n            }).catch(function(error){\r\n                console.log('error', error);\r\n            });\r\n```\r\n具体错误打印如下：\r\n```\r\n0.3333333333333333\r\nObject {file: File, name: \"test.ppt\", fileSize: 2641920, partSize: 1048576, uploadId: \"2229B482342323414B533C3E1180F0814\"…}\r\nerror TypeError: You may only yield a function, promise, generator, array, or object, but the following object was passed: \"undefined\"(…)\r\n```\r\n麻烦帮忙看一下这个问题是怎么出现的，要怎么解决，谢谢了\r\n备注： 我如果采用`ossUpload.multipartUpload(file.name, file)`的形式调用的话，页面就不会报错，能够上传成功，但是这个就没有进度回调了\r\n"},"comment":{"url":"https://api.github.com/repos/ali-sdk/ali-oss/issues/comments/216742608","html_url":"https://github.com/ali-sdk/ali-oss/issues/98#issuecomment-216742608","issue_url":"https://api.github.com/repos/ali-sdk/ali-oss/issues/98","id":216742608,"user":{"login":"rockuw","id":1209779,"avatar_url":"https://avatars.githubusercontent.com/u/1209779?v=3","gravatar_id":"","url":"https://api.github.com/users/rockuw","html_url":"https://github.com/rockuw","followers_url":"https://api.github.com/users/rockuw/followers","following_url":"https://api.github.com/users/rockuw/following{/other_user}","gists_url":"https://api.github.com/users/rockuw/gists{/gist_id}","starred_url":"https://api.github.com/users/rockuw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rockuw/subscriptions","organizations_url":"https://api.github.com/users/rockuw/orgs","repos_url":"https://api.github.com/users/rockuw/repos","events_url":"https://api.github.com/users/rockuw/events{/privacy}","received_events_url":"https://api.github.com/users/rockuw/received_events","type":"User","site_admin":false},"created_at":"2016-05-04T04:53:02Z","updated_at":"2016-05-04T04:53:02Z","body":"@zousandian 在node.js中用yield是没问题的，出问题的情况是在浏览器中，没有使用yield。"}}