​uploadFile问题
发布于 6 年前 作者 yan97 7295 次浏览 来自 问答

uploadFile:fail exceed max upload connection count 10

没有多次调用,没有循环,不知道为什么就报这个提示了。

        wx.chooseImage({

            count: 1,

            sizeType: [‘original’‘compressed’],

            sourceType: [‘album’‘camera’],

            success: function(res) {

                dialog.toast(‘正在上传图片…’);

                wx.uploadFile({

                    url: uploadfile_api_url,

                    filePath: res.tempFilePaths[0],

                    name: ‘file’,

                    success: function(res) {

                        var data = res.data

                        var status = res.statusCode

                            //do something

                        console.log(“success_data”data);

                        console.log(“success_status”status);

                    },

                    complete: function() {

                        console.log(“upload complete”);

                    },

                    fail: function(res) {

                        console.log(“fail”res);

                    }

                });

            },

            complete: function() {

                console.log(‘chooseImage complete’);

            },

            fail: function(res) {

                console.log(‘fail’res);

            }

        });

3 回复

请问这个问题解决了吗?这两天一直查问,和你的问题一样

连接数超过10了

发现PC开发者工具出这个错误。

回到顶部