标签:color ipa ring console bsp orm rod pen string
//选图片 chooseImage () { uni.chooseImage({ count: 100, //默认9 sizeType: [‘original‘, ‘compressed‘], success: (res) => { console.log(res) res.tempFilePaths.forEach(item => { console.log(item) this.imageList.push({ src: item, mode: ‘aspectFit‘ }) }) } }); }, var formData = new FormData(); this.imageList.forEach(item => { var myFile = new File([item.src], ‘‘, {type: "multipart/form-data"}); formData.append(‘file‘, myFile) }) formData.append(‘json‘, JSON.stringify(this.pub)) axios.post(`http://10.112.61.0:8080/app/productController/createProduct`, formData).then((response) => { }).then((err) => { })
uniapp Blob路径转文件流 并且将json对象和文件流一起传入后台
标签:color ipa ring console bsp orm rod pen string
原文地址:https://www.cnblogs.com/guozongzhang/p/11940189.html