Forums

Home » Liferay Portal » English » 2. Using Liferay » General »

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
DJ Williams
Can't upload certain file types
April 15, 2008 8:57 AM
Answer

DJ Williams

Rank: Junior Member

Posts: 25

Join Date: April 9, 2008

Recent Posts

I was trying to upload certain files type in particular MS Project .mpp files and also some mp3's. I get an error saying I cant upload those type.

Is there a configuration setting to add these files types. Also, would like to know how to set the maximum file upload size for a folder after it's been created.

Cheers.
Björn Ryding
RE: Can't upload certain file types
April 15, 2008 9:54 AM
Answer

Björn Ryding

Rank: Liferay Master

Posts: 580

Join Date: May 16, 2007

Recent Posts

See the following section of portal.properties:
portal.properties:
#
# Set the maximum file size and valid file extensions for documents. A value
# of 0 for the maximum file size can be used to indicate unlimited file
# size. However, the maximum file size allowed by the system is set in
# property "com.liferay.util.servlet.UploadServletRequest.max.size" found in
# system.properties. A file extension of * will permit all file extensions.
#
# You can map a GIF for the extension by adding the image to the theme's
# image display and document library folder. The wildcard extension of *
# will be ignored. For example, the default image for the DOC extension
# would be found in: /html/themes/classic/images/document_library/doc.gif.
#
#dl.file.max.size=307200
#dl.file.max.size=1024000
dl.file.max.size=3072000
dl.file.extensions=.bmp,.css,.doc,.dot,.gif,.gz,.htm,.html,.jpg,.js,.odb,.odf,.odg,.odp,.ods,.odt,.pdf,.png,.ppt,.rtf,.swf,.sxc,.sxi,.sxw,.tar,.tiff,.tgz,.txt,.vsd,.xls,.xml,.zip
Paul Hussein
RE: Can't upload certain file types
April 15, 2008 10:36 AM
Answer

Paul Hussein

Rank: Junior Member

Posts: 63

Join Date: May 30, 2006

Recent Posts

Grab the portal.properties from the sourec bundle, and copy portions you want to override to portal-ext.properties and drop it into the classes dir of the running portal, and restart.
DJ Williams
RE: Can't upload certain file types
April 15, 2008 11:48 AM
Answer

DJ Williams

Rank: Junior Member

Posts: 25

Join Date: April 9, 2008

Recent Posts

You guys are very cool...

Comment to the LifeRay dev team, I looked around the site and in the docs but, couldn't find this info. If it isn't in the CMS docs it should be.


Thanks for the help.
Michael Saechang
RE: Can't upload certain file types
April 15, 2008 1:01 PM
Answer

Michael Saechang

LIFERAY STAFF

Rank: Liferay Master

Posts: 573

Join Date: November 19, 2007

Recent Posts

Hi D Ohn,

There is some information on the portal.properties and how to find it in the link below. In the portal.properties there are descriptions for what the properties do. What Björn posted should be what you're looking for. I hope you are able to find what you're looking for.

Forum Guidelines and FAQ


-mike
Jérôme Chauvin
RE: Can't upload certain file types
July 7, 2008 8:07 AM
Answer

Jérôme Chauvin

Rank: New Member

Posts: 16

Join Date: July 2, 2008

Recent Posts

Hi there,

I've been looking for the portal.properties but I can't find them. I'm using the bundled liferay-portal-tomcat-5.5-5.0.1
Anyone knows?

edit: I read that I'm supposed to override the properties the jar file with the portal-ext properties, but I don't get how to do this (what kind of file is it and where?)


Thanks in advance.
Raju Uppalapati
RE: Can't upload certain file types
July 7, 2008 8:12 AM
Answer

Raju Uppalapati

Rank: Junior Member

Posts: 66

Join Date: October 24, 2007

Recent Posts

The portal.properties file is bundled into the portal-impl.jar file webapps/ROOT/WEB-INF/lib/portal-impl.jar
jar -tvf webapps/ROOT/WEB-INF/lib/portal-impl.jar | grep portal.properties

Extract it, put the properties you want to override in a file named: webapps/ROOT/WEB-INF/classes/portal-ext.properties
Restart your tomcat server and it will show a message that the portal-ext.properties is being read at startup time in the catalina.out

_raju
Jérôme Chauvin
RE: Can't upload certain file types
July 7, 2008 12:08 PM
Answer

Jérôme Chauvin

Rank: New Member

Posts: 16

Join Date: July 2, 2008

Recent Posts

Ok, thank you Raju for replying.

I 'm giving it a try first thing in the morning.