egg
egg copied to clipboard
关于multipart/form-data 格式传递数据
Translation of this issue:
Passing data in multipart/form-data format
If passed the file file
Can indeed pass
Const stream = await this.ctx.getFileStream();
Get to file and other fiels
But only wear other fields
This function is incorrect, how to get all the data in the upload formData (this file is optional, there is no unified processing) I see online that is automatically judged to have a file when adding multipart/form-data, no file to use ordinary format to upload to handle, but very troublesome
@dmodaii 你好,我遇到了和你一样的问题,但是不知道怎么解决,请问一下,您是如何解决的、
@OctoberCity 仿照官方提供的 https://eggjs.org/zh-cn/basics/controller.html 里面的 ctx.multipart(); 遍历