javascript - 七牛react上传超过1g的视频,失败,求大神给看看
巴扎黑
巴扎黑 2017-04-10 17:34:12
[JavaScript讨论组]

SuperagentPromiseError {message: "Bad request", name: "SuperagentPromiseError", originalError: Error: Request has been terminated
Possible causes: the network is offline, Origin is not allowed by…, stack: "SuperagentPromiseError: Bad request↵ at http://…ttp://localhost:3000/build/js/common.js:27420:21)", __stackCleaned__: true}__stackCleaned__: truemessage: "Bad request"name: "SuperagentPromiseError"originalError: Error: Request has been terminated
Possible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.

at Request.crossDomainError (http://localhost:3000/build/js/common.js:6240:14)
at XMLHttpRequest.xhr.onreadystatechange (http://localhost:3000/build/js/common.js:6310:20)crossDomain: truemessage: "Request has been terminated↵Possible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc."method: "POST"stack: (...)get stack: stack()arguments: nullcaller: nulllength: 0name: "get stack"__proto__: ()<function scope>set stack: stack()arguments: nullcaller: nulllength: 1name: "set stack"__proto__: ()<function scope>status: undefinedurl: "http://upload.qiniu.com/"__proto__: Objectstack: "SuperagentPromiseError: Bad request↵    at http://localhost:3000/build/js/index.js:152068:19↵    at Request.callback (http://localhost:3000/build/js/common.js:6230:4)↵    at Request.crossDomainError (http://localhost:3000/build/js/common.js:6247:9)↵    at XMLHttpRequest.xhr.onreadystatechange (http://localhost:3000/build/js/common.js:6310:20)↵    at Request.crossDomainError (http://localhost:3000/build/js/common.js:6240:14)↵    at XMLHttpRequest.xhr.onreadystatechange (http://localhost:3000/build/js/common.js:6310:20)↵From previous event:↵    at Request.promise (http://localhost:3000/build/js/index.js:152058:11)↵    at Constructor.onDrop (http://localhost:3000/build/js/index.js:23394:48)↵    at Object.executeOnChange (http://localhost:3000/build/js/common.js:12540:35)↵    at ReactDOMComponent._handleChange (http://localhost:3000/build/js/common.js:25734:39)↵    at Object.ReactErrorUtils.invokeGuardedCallback (http://localhost:3000/build/js/common.js:12793:17)↵    at executeDispatch (http://localhost:3000/build/js/common.js:12200:22)↵    at Object.executeDispatchesInOrder (http://localhost:3000/build/js/common.js:12223:6)↵    at executeDispatchesAndRelease (http://localhost:3000/build/js/common.js:7163:23)↵    at executeDispatchesAndReleaseTopLevel (http://localhost:3000/build/js/common.js:7174:11)↵    at Array.forEach (native)↵    at forEachAccumulated (http://localhost:3000/build/js/common.js:18468:10)↵    at Object.processEventQueue (http://localhost:3000/build/js/common.js:7350:8)↵    at runEventQueueInBatch (http://localhost:3000/build/js/common.js:27250:19)↵    at Object.handleTopLevel [as _handleTopLevel] (http://localhost:3000/build/js/common.js:27261:6)↵    at handleTopLevelImpl (http://localhost:3000/build/js/common.js:27343:25)↵    at ReactDefaultBatchingStrategyTransaction.perform (http://localhost:3000/build/js/common.js:7772:21)↵    at Object.batchedUpdates (http://localhost:3000/build/js/common.js:27133:20)↵    at Object.batchedUpdates (http://localhost:3000/build/js/common.js:3449:21)↵    at dispatchEvent (http://localhost:3000/build/js/common.js:27420:21)"__proto__: Error
at Object.<anonymous> (http://localhost:3000/build/js/index.js:152036:37)
at __webpack_require__ (http://localhost:3000/build/js/common.js:586:30)
at fn (http://localhost:3000/build/js/common.js:110:20)
at Object.<anonymous> (http://localhost:3000/build/js/index.js:23325:16)
at __webpack_require__ (http://localhost:3000/build/js/common.js:586:30)
at fn (http://localhost:3000/build/js/common.js:110:20)
at Object.<anonymous> (http://localhost:3000/build/js/index.js:8715:22)
at __webpack_require__ (http://localhost:3000/build/js/common.js:586:30)
at fn (http://localhost:3000/build/js/common.js:110:20)
at Object.<anonymous> (http://localhost:3000/build/js/index.js:6041:26)
at __webpack_require__ (http://localhost:3000/build/js/common.js:586:30)
at fn (http://localhost:3000/build/js/common.js:110:20)
at Object.<anonymous> (http://localhost:3000/build/js/index.js:87143:13)
at __webpack_require__ (http://localhost:3000/build/js/common.js:586:30)
at fn (http://localhost:3000/build/js/common.js:110:20)
at Object.<anonymous> (http://localhost:3000/build/js/index.js:127589:22)

index.js:115976 cancel Object {value: 0}value: 0__proto__: Object

巴扎黑
巴扎黑

全部回复(1)
伊谢尔伦

Possible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded.
这个意思是说可能的原因有网断了,跨域了,页面卸载了。
如果你以前上传成功过,那问题就是网断了,后边的跨域的问题不存在。

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号