安卓实机调用wx.uploadFile时上传数值问题
发布于 5 年前 作者 sunming 10718 次浏览 来自 问答

当安卓实机使用wx.uploadFile时,如果formData中某参数的值是数值时,服务端会收到’Object Number’的字符串,如下列代码片段中的photo_num

        console.log(that.config.uploadImgs.length);

        wx.uploadFile({

            url:that.config.upApi,

            filePath:that.config.thumb,

            name:‘file’,

            formData:{

                session:session,

                mode:mode,

                temp_id:temp_id,

                photo_num:that.config.uploadImgs.length,

                texts:texts

            },

1 回复

更新6.5.3

回到顶部