我遵循了这个教程:https://valor-software.com/ng2-file-upload/
它在Postman上运行得很好,但当我在我的应用程序中尝试它时,它就不行了。从api中,我返回了文件,我在Postman中看到了它们,但在我的应用程序中却没有定义。
我确实注意到,在我的应用程序中,我的请求Content-Type设置为:
text/plain;charset=UTF-8我尝试设置为:
multipart/form-data但随后得到了边界错误。
有什么建议吗?
发布于 2020-05-13 18:09:38
我在服务器上更改了以下内容:
@UseInterceptors(FileInterceptor('files'))至:
@UseInterceptors(FileInterceptor('file'))它开始起作用了,不知道为什么邮递员要工作。
https://stackoverflow.com/questions/61751802
复制相似问题