sapmentors / cap-community

SAP CAP Community
MIT License
97 stars 26 forks source link

Issue with OpenUI5 sap.ui.unified.FileUploader and OData V2 #20

Open gregorwolf opened 4 years ago

gregorwolf commented 4 years ago

Hello CAP Experts,

I'm trying to extend the media-handling example with a working SAPUI5 UI. But when I use the @sap/cds-odata-v2-adapter-proxy to provide OData V2 and try to upload a file using the Control sap.ui.unified.FileUploader the following error is returned:

No payload deserializer available for resource kind 'ENTITY' and mime type 'multipart/form-data'

The example project can be found at:

https://github.com/gregorwolf/cap-community/tree/master/examples/media-handling

you can get it running by using:

npm run build
npm run deploy
npm run startv2

Now open http://localhost:4004/v2/ and try to upload a png file. I.e. the one from the srv/tests folder of the project.

I would expect that either CAP would support how sap.ui.unified.FileUploader does the upload or that sap.ui.unified.FileUploader is adjusted to the way CAP expects the upload.

Best regards Gregor