cancel
Showing results for 
Search instead for 
Did you mean: 

Interesting Problem trying to display Content Server Image in Fiori app using URL only

jon_scruby
Discoverer
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

gregorw
Active Contributor

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.

jon_scruby
Discoverer
0 Kudos

Hi Gregor, many thanks for your comment. Whether or when the client I work for goes to HTTPS is another matter for another day. All content server content is via HTTP for the time being.

gregorw
Active Contributor
0 Kudos

But have you checked the console output?

bingbing
Explorer
0 Kudos

Can anyone share how to setup https so sapui5 can securely access files or images from sap content server ?

gregorw
Active Contributor
0 Kudos

Ask your SAP Basis admin if it is an on premise system.