- wx.uploadFile的表单数据含Boolean值时会变成[[object Boolean]]?
微信开发者工具Stable 1.06.2405010 调试基础库3.4.5 JS代码: let tmp = res.tempFiles[0].tempFilePath; wx.uploadFile({ url: `${BASE_URL}/test`, name: 'file', filePath: tmp, formData: { // 表单Boolean param: true }, success: res => { console.log(res); }, fail: err => { console.log(err); } }); 后端代码: @RestController @RequestMapping("/test") public class TestController { @PostMapping public ApiResponse testUpload(@RequestParam MultipartFile file, @RequestParam Boolean param) { return ApiResponse.success(); } } 报错: [图片] { msg: "[2024-06-12 23:02:05.784]: (MethodArgumentTypeMismatchException) Failed to convert value of type 'java.lang.String' to required type 'java.lang.Boolean'; Invalid boolean value [[object Boolean]]" }
2024-06-12 - RecorderManager.onFrameRecorded()回调中的数据帧是什么?
this.recorder.start({ duration: '60000', format: 'PCM', frameSize: 4, numberOfChannels: 1, sampleRate: 16000 }) [图片] 我的代码采集到上述数据帧后,传至服务端进行合并,合并成一个PCM文件。在某站PCM文件转MP3文件播放的时候发现播放得不对。 难道RecorderManager.onFrameRecorded()回调中的数据帧合并之后得文件不等同于RecorderManager.onStop()保存下来的文件吗? 或者说开发者工具不支持?
2024-05-22