Since the server was being migrated and it was already a hack, something had to change, preferably for the better. So we were looking into placing the movie, the movie player and the skin for the movie player, all .flv files into the Liferay document library. Well this is were we ran into the first problems:
- File extension: .flv and .swf files can't be added to the library by default. Solution: adding dl.file.extensions=.flv,.swf,.mov,.avi,.mp4,.mp3,.m4v,.bmp,.css,.doc,.dot,.gif,.gz,.htm,.html,.jpg,.js,.lar,.odb,.odf,.odg,.odp,.ods,.odt,.pdf,.png,.ppt,.rtf,.swf,.sxc,.sxi,.sxw,.tar,.tiff,.tgz,.txt,.vsd,.xls,.xml,.zip to your portal-ext.properties and restarting the portal. We also tried dl.file.extensions=* and dl.file.extensions=.*, but both didn't work as expected.
- File size: the movie file turned out to be to big for the document library, but this can be solved by adding dl.file.max.size=0 to your portal-ext.properties and restarting the portal.
Now we were getting desperate, what other possibilities were left? A custom portlet maybe? We tried some more of the stuff mentioned in the Liferay forums, when we saw some reference to Flash content in the following path /html/js/flashutils/player.swf. We check our Liferay installation and in the /webapps/ROOT directory we found a /html directory. We created a new directory, media, beneath it, placed our three Flash files in it and referenced to them from our journal article as follows (other paths are similar):
<param name="movie" value="/html/media/movie.flv" />
We saved the article, browsed to the correct page and now the movie is shown in its full glory. Disclaimer: this is a dirty hack, we don't recommend to use it, certainly not in a structural way, but until we've found a better, working solution, this does solve our problem for now.
Great work; Boss Canu plz tell me how u are referring file from document library to Journal portlet(web content)
ReplyDelete@sree We aren't referring to a file in the document library, that's the point. We tried it and couldn't get it to work. Placing the file inside of the 'html' directory in the Liferay application did work, but in that way you can't add files via the document library or view them in it. We needed to manually transfer the file to the server and copy it the that directory in Liferay.
ReplyDelete