Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
YujiaCheng1996 opened this issue Feb 7, 2023 · 0 comments · Fixed by #80
Closed

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

YujiaCheng1996 opened this issue Feb 7, 2023 · 0 comments · Fixed by #80

Comments

@YujiaCheng1996
Copy link
Contributor

YujiaCheng1996 commented Feb 7, 2023

有一些通过一个接口批量上传图片的需求:
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上传多个文件。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant