最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

typescript - Angular Reactive Form File Upload - Stack Overflow

programmeradmin0浏览0评论

I have this reactive form which contains an array of Formgroups. And in the field of these formgroups, there are form controls which I intend to have file uploads. Is this possible? I have seen file uploads for reactive forms using the FormData web API but it's mostly for single file uploads. Or is this still possible using FormData web API? Ideally, I would want to send a POST request to the backend in JSON form.

Reactive Form Value:

formGroupArray = [
 {
   "formgroupOne": {
      fileUploadOne: "",
      fileUploadTwo: "",
    }
 },
 {
   "formgroupTwo": {
      fileUploadOne: "",
      fileUploadTwo: "",
    }
 },
];

发布评论

评论列表(0)

  1. 暂无评论