Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
sri p
html document display in web browser - document library
November 11, 2013 6:06 PM
Answer

sri p

Rank: Junior Member

Posts: 85

Join Date: January 22, 2011

Recent Posts

Hello All,

I have a question related to document library, I hope somebody could help me or throw an idea.

There is an HTML file uploaded in document library, I would like to show this html, when user clicks a link.

I tried this, but it is saying "open, save" file pop up box and if I click "open" then it is displayed in the browser.

http://localhost:8180/documents/10437/21715/contactUs.html/#

Is it possible to directly display this HTML page, rather window pop up box asking user to "open or save" ?


Thank you,
Sri
sri p
RE: html document display in web browser - document library
November 12, 2013 8:57 AM
Answer

sri p

Rank: Junior Member

Posts: 85

Join Date: January 22, 2011

Recent Posts

Could any one from liferay help me ?

I have HTML file with links to pdf files. HTML file, pdf files. HTML , PDF files are in document library.

What would be the approach to display HTML file on the browser and display pdf file on click of a link in HTML file ?


I would really appreciate any ideas, help or an example!

Thanks,
Sri
Vitaliy Koshelenko
RE: html document display in web browser - document library
November 12, 2013 1:36 PM
Answer

Vitaliy Koshelenko

Rank: Expert

Posts: 285

Join Date: March 25, 2011

Recent Posts

Hi!

You can use WebContentDisplay instead of document display for this purpose.
Create appropriate WebContent structure and template for displaying html document, create WebContent itself, and choose this WebContent in WebContentDisplay portlet.

Vitaliy
venka reddy
RE: html document display in web browser - document library
November 12, 2013 9:17 PM
Answer

venka reddy

Rank: Regular Member

Posts: 231

Join Date: March 23, 2011

Recent Posts

Have you look into these properties in portal.properties

Remove pdf and try it

##
## Mime Types
##

#
# Input a list of comma delimited extensions for which the content
# disposition header has to be set to "inline".
#
mime.types.content.disposition.inline=flv,gif,jpg,pdf,png,swf,wmv
sri p
RE: html document display in web browser - document library
November 13, 2013 1:34 PM
Answer

sri p

Rank: Junior Member

Posts: 85

Join Date: January 22, 2011

Recent Posts

i will try this. I want to display HTML in inline. I will include "html" type and see.

Thanks for the tip.
sri p
RE: html document display in web browser - document library
November 13, 2013 1:36 PM
Answer

sri p

Rank: Junior Member

Posts: 85

Join Date: January 22, 2011

Recent Posts

Thanks Vitaliy, I am up for this, if I could not get display an HTML file of document library in "inline".
sri p
RE: html document display in web browser - document library
November 14, 2013 11:41 AM
Answer

sri p

Rank: Junior Member

Posts: 85

Join Date: January 22, 2011

Recent Posts

venka reddy:
Have you look into these properties in portal.properties

Remove pdf and try it

##
## Mime Types
##

#
# Input a list of comma delimited extensions for which the content
# disposition header has to be set to "inline".
#
mime.types.content.disposition.inline=flv,gif,jpg,pdf,png,swf,wmv



This worked, thank you !!!