fjc0k / yapi-to-typescript

根据 YApi 或 Swagger 的接口定义生成 TypeScript 或 JavaScript 的接口类型及其请求函数代码。
https://fjc0k.github.io/yapi-to-typescript/handbook/
MIT License
443 stars 81 forks source link

fileData是数组时getFormData()报错 #79

Closed YujiaCheng1996 closed 1 year ago

YujiaCheng1996 commented 1 year ago

有一些通过一个接口批量上传图片的需求: formData结构如: xxxId: 123 files: 二进制1 files: 二进制2 自编写的request函数传入{ xxxId: 123, files:[ File1, File2 ]} 这时使用getFormData()报错Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'。 主要需求是,通过同一个key上传多个文件。