‎2024 Dec 15 10:50 AM - edited ‎2024 Dec 15 12:28 PM
Hello Experts,
We have a requirement to upload a file to the Hana DB Table in BTP Cloud. The table is created via CAP Model entity and the field is LargeBinary and annotated as MediaType (pdf).
Based on the CAP Entity, we have created Service file also and the oData V4 is generated successfully.
Now while trying to upload the file via file Uploader UI, the update is not happening.
As a troubleshoot method, we created a standard Fiori List Report and it worked as expected.
We would like to upload the file in our custom Freestyle application which sometimes ended up in Error 413 (request payload too large). The same oData service works from postman as well.
We also tried in two parts, Creating a record with UUID and then update the file with PUT method. This also did not work as expected.
Attached the CAP, UI5 code etc.
Any help in this regards is highly appreciated.
Best Regards,
Vivek
Request clarification before answering.
Hi Viwek,
You need to follow the OData streaming choreography, first you need to create the surrounding instance, then use `PUT` to stream in the large binary. Here you can find more details:
https://cap.cloud.sap/docs/guides/providing-services#creating-a-media-resource
Best regards,
David
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 6 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.