joomla jce editor resolved failure to upload Chinese name files

  • 2020-06-12 08:43:56
  • OfStack

Neither JCE nor CKEDITOR solves the Chinese name file problem, either the upload fails or the Chinese name uploaded cannot be accessed by web. JCE, by contrast, is more user-friendly. For example, when a file is uploaded, it is selected by default, so users don't have to scroll through a small pop-up window to search for the newly uploaded file. Studied the JCE source code, change the way to save the file name, using pure Numbers as the file name.

To find components joomla installation directory, / com_jce editor extensions/browser/file php, modify the line 1017-1020:
 
// strip extension 
$name = WFUtility::stripExtension($name); 
// make file name 'web safe' 
$name = WFUtility::makeSafe($name, $this->get('websafe_mode', 'utf-8')); 

to
 
$name = date('Ymd-His-', time()).rand(999); 

My joomla version is 1.5 and JCE version 2.1.3, and the changes may vary slightly between versions.

Related articles: