diff --git a/htdocs/ecm/index.php b/htdocs/ecm/index.php
index fd9169448eeeaff2407aec23b1a792021a7f2133..197c7e88ebd9a0c95af8bbb9410fdcced163ce15 100644
--- a/htdocs/ecm/index.php
+++ b/htdocs/ecm/index.php
@@ -591,7 +591,7 @@ $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolowe
 $formfile=new FormFile($db);
 $param='&section='.$section;
 $textifempty=($section?$langs->trans("NoFileFound"):$langs->trans("ECMSelectASection"));
-$formfile->list_of_documents($filearray,'','ecm',$param,1,$relativepath,$user->rights->ecm->upload,1,$textifempty);
+$formfile->list_of_documents($filearray,'','ecm',$param,1,$relativepath,$user->rights->ecm->upload,1,$textifempty,40);
 
 //	print '<table width="100%" class="border">';
 
diff --git a/htdocs/html.formfile.class.php b/htdocs/html.formfile.class.php
index 650ebe4e3c3a0d35bd415683db99141f34d21e6b..ea3deb5f48acf74b50ae1b5d7f396ef5347b9575 100644
--- a/htdocs/html.formfile.class.php
+++ b/htdocs/html.formfile.class.php
@@ -421,7 +421,7 @@ class FormFile
 	 * 		\param		textifempty			Text to show if filearray is empty
 	 * 		\return		int					<0 if KO, nb of files shown if OK
 	 */
-	function list_of_documents($filearray,$object,$modulepart,$param,$forcedownload=0,$relativepath='',$permtodelete=1,$useinecm=0,$textifempty='')
+	function list_of_documents($filearray,$object,$modulepart,$param,$forcedownload=0,$relativepath='',$permtodelete=1,$useinecm=0,$textifempty='',$maxlength=0)
 	{
 		global $user, $conf, $langs;
 		global $bc;
@@ -461,7 +461,7 @@ class FormFile
 				if ($forcedownload) print '&type=application/binary';
 				print '&file='.urlencode($relativepath.$file['name']).'">';
 				print img_mime($file['name']).' ';
-				print $file['name'];
+				print dol_trunc($file['name'],$maxlength,'middle');
 				print '</a>';
 				print "</td>\n";
 				print '<td align="right">'.dol_print_size($file['size']).'</td>';