02-18-2019 11:35 AM - edited 02-04-2024 5:05 AM
Hi SCNers,
I would like to display a SAP content server image in a Fiori application by simply passing the URL of the image to the application but it doesn't seem to work. I'm using iFrame to display the image in the app.
If I copy and paste the URL for a content server image directly into an Internet Explorer browser, the image is displayed in the browser. If I develop a simple Fiori app and use iFrame to display the web page of a BBC news article in the app, the image is successfully displayed. However, when I replace the URL of the BBC news article with the URL of the content server image, when the app is run, a blank screen id displayed (i.e. no other elements in the view are displayed), and using Chrome debug tools it seems that the XML view has been corrupted.
An example of the content server image is:
http://<content server host:port>/sap/bc/contentserver/200?get&pVersion=0046&contRep=E1&docId=E908EA2E16DA64E19469005056A7439F∁Id=data∾cessMode=r&authId=CN%3DDE0&expiration=20190219110616&secKey=MIH3BgkqhkiG9w0BBwKggekwgeYCAQExCzAJBgUrDgMCGgUAMAsGCSqESIb3DQEHATGBxjCBwwIBATAZMA4xDDAKBgNVBAMTA0RFMAIHIBICIhIUADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTkwMjE4MTEwNjE2WjAjBgkqhkiG9w0BCQQxFgQU7e1Pe54ologHB3cwruOSRETvtTUwCQYHKoZIzjgEAwQuMCwCFBWpMCw8pxeTGtS%2BEBFCblAukPZsAhRO79e0LM67veT1z5KAIA%2B8IZZ5NQ%3D%3D
An example of the iFrame code that works for the BBC news article:
<html:iframe id="testId" target='_blank' height="100%" width="100%" src="https://www.bbc.co.uk/news/entertainment-arts-47254707"> </html:iframe>
An example of the iFrame code that doesn't work for the content server image:
<html:iframe id="testId" target='_blank' height="100%" width="100%" src="<content server URL>"> </html:iframe>
From investigations it seems that the parameters passed in the URL (to identify the content server image) are causing the XML view to be corrupted, so if I edit the URL so that it does not contain the parameters (i.e. 'http://<server host:port>/sap/bc/contentserver/200'), then the application view is displayed with other view elements displayed but the iFrame area shows the default message 'Content not found'.
Does anyone know why the content server image isn't being displayed, and how to get around this (without developing the code to pass the content of the image using GET_STREAM gateway method?
Many thanks in advance for you help!
Jon
Have you checked the developer tools console? I would guess you get an error due to the missing https for your content server. It's 2019, bring your SAP System to HTTPS.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
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.