10-29-2018 3:33 PM - edited 02-04-2024 4:50 AM
Hello,
I like to consume the SAP Leonardo ML service
"/scene-text-recognition" from my SAPUI5 app.
But I don't know how to fill the "oData" parameter in loadData method.
oModel.loadData("https://sandbox.api.sap.com/ml/scenetextrecognition/scene-text-recognition", oData, true, "POST", null, false, sHeaders);
How does the odata payload looks like?
Thanks in advance.
Kind regards
Axel
Hi Gregor,
thanks for the fast reply.
Of course I checked the description of the service first, but I only found for the following part about the request payload
files * file (formData)
Image from which to extract texts. Please provide a single color image file having dimensions equal or greater than 64 pixels. **
I also tested sucsessfully the "javascript" approach, but would it be not better to use the SAPUI5 approach in a SAPUI5 app?
The formData object looks like this:
data.append("files", "<file_contents>", "<filename>");
and the oData?
{ files: { content: <file_content>, name: <filename> } }
Thanks,
Axel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would suggest that you have a look at the description of the service at:
https://api.sap.com/api/scene_text_recognition_api/resource
also you should check the JavaScript example that is provided when you click "Code Snippet".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.