Hi!
I am trying to load images following the instructions from readme.md
And when I pass field name to the data provider I am getting the following error: Unhandled Rejection (Error): The dataProvider threw an error. It should return a rejected Promise instead.
Hi! I am trying to load images following the instructions from readme.md And when I pass field name to the data provider I am getting the following error: Unhandled Rejection (Error): The dataProvider threw an error. It should return a rejected Promise instead.
///api/dish/models/dish.settings.json
...
"image": {
"model": "file",
"via": "related",
"allowedTypes": [
"images"
],
"plugin": "upload",
"required": false,
"pluginOptions": {}
},
...
in App.js: const uploadFields = ["image"]; const dataProvider = simpleRestProvider(baseUrl, uploadFields);