我正在尝试上传一个文件: // ... prep work above here
'POST',根据Angular文档,定义自己的HttpRequest并将其作为单个参数传递给http.request方法,默认情况下会返回一个HttpEvents流。但是,我只得到一个事件:完整事件。console.log('Request completed', event.body);
我做了一些研究,但没有在Angular 5上找到任何线索。我尝试使用ngx-file-drop,但出现兼容性错误。@angular/compiler-cli@5.2.11 requires a peer of typescript@>=2.4.2 <2.7 but none is installed.You must install peer dependencies yourself.
npm WARN ngx-file-drop@6.0.0 requires a peer of @angularYou must i