ng2-file-upload的内部Express服务器返回500错误

时间:2019-01-29 20:26:40

标签: angular express file-upload

在致电ng2-file-upload的{​​{1}}包裹上,我收到来自uploader.uploadAll();的内部快递服务器的500响应:

ng2-file-upload

选项对象:

TypeError: Cannot read property 'toLowerCase' of null
    at Route._handles_method (/home/idea/Development/HisasOnline/web-app/node_modules/express/lib/router/route.js:63:21)
    at next (/home/idea/Development/HisasOnline/web-app/node_modules/express/lib/router/index.js:244:30)
    at expressInit (/home/idea/Development/HisasOnline/web-app/node_modules/express/lib/middleware/init.js:40:5)
    at Layer.handle [as handle_request] (/home/idea/Development/HisasOnline/web-app/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/home/idea/Development/HisasOnline/web-app/node_modules/express/lib/router/index.js:317:13)
    at /home/idea/Development/HisasOnline/web-app/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/home/idea/Development/HisasOnline/web-app/node_modules/express/lib/router/index.js:335:12)
    at next (/home/idea/Development/HisasOnline/web-app/node_modules/express/lib/router/index.js:275:10)
    at query (/home/idea/Development/HisasOnline/web-app/node_modules/express/lib/middleware/query.js:45:5)
    at Layer.handle [as handle_request] (/home/idea/Development/HisasOnline/web-app/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/home/idea/Development/HisasOnline/web-app/node_modules/express/lib/router/index.js:317:13)
    at /home/idea/Development/HisasOnline/web-app/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/home/idea/Development/HisasOnline/web-app/node_modules/express/lib/router/index.js:335:12)
    at next (/home/idea/Development/HisasOnline/web-app/node_modules/express/lib/router/index.js:275:10)
    at Function.handle (/home/idea/Development/HisasOnline/web-app/node_modules/express/lib/router/index.js:174:3)
    at Function.handle (/home/idea/Development/HisasOnline/web-app/node_modules/express/lib/application.js:174:10)

1 个答案:

答案 0 :(得分:0)

PATCH方法是不支持这就是为什么你得到了这个错误,使用POST