Page 1 of 1

Can not upload files with Russian (Cyrillic) names...

Posted: 24 Oct 2012, 22:17
by fale
Hi !
I'm making a website and want to use your PhocaGallery.
Faced with the following important problem PhocaGallery.
Can not upload files with Russian (Cyrillic) names. Error: The file type is not supported.
With excellent English names of the files being downloaded.
Users of the site, mainly from Russia will have a disadvantage when loading the site. How to solve this problem?

I Need help.
Regards, Vitalijj

Re: Can not upload files with Russian (Cyrillic) names...

Posted: 26 Oct 2012, 13:32
by fale
" File type is not supported"
Why does not support downloading files with Russian names? How to fix it?

Re: Can not upload files with Russian (Cyrillic) names...

Posted: 31 Oct 2012, 00:45
by Jan
Hi, there is no support for utf8 filenames for now (as still many servers has problems with this) so such needs to be customized directly for the server :-( :-(

(to be sure, the server is ready for it)

Jan

Re: Can not upload files with Russian (Cyrillic) names...

Posted: 31 Oct 2012, 14:45
by fale
Thank you. What do I need to configure the server to fix the problem?
UTF-8 is scheduled for PhocaGallery?

Re: Can not upload files with Russian (Cyrillic) names...

Posted: 31 Oct 2012, 22:51
by Jan
Hi, everything works with utf-8 but the filenames not (as there were e.g. problems on some server to read, write, etc. them :idea: )

Jan

Re: Can not upload files with Russian (Cyrillic) names...

Posted: 16 Mar 2014, 14:04
by plamen
Hi,
is there any progress regarding UTF-8 filenames?
I need it for Phoca Download component also.

Re: Can not upload files with Russian (Cyrillic) names...

Posted: 18 Mar 2014, 01:18
by Jan
Hi, for now I am still reviewing this feature but as many problems were not solved yet, for now I cannot say if and or when I will take a look at this problem :idea:

Re: Can not upload files with Russian (Cyrillic) names...

Posted: 23 Feb 2018, 22:29
by exbb
Hi, i had there was this problem, but i "to invent the wheel" =)

if plamen or other Russian people find this topic how am i in google, you need modify file:
\administrator\components\com_phocagallery\libraries\phocagallery\file\fileupload.php
Or for phocadownload
\administrator\components\com_phocadownload\libraries\phocadownload\file\fileupload.php

after code in phocadownload

Code: Select all

class PhocaDownloadFileUpload
{
in phocagallery find
class PhocaGalleryFileUpload
{

need paste this function

Code: Select all

	public static function  realCyrillicTranslit($s) {
		
		$path_info = pathinfo($s);
		$s = JFile::makeSafe(JApplicationHelper::stringURLSafe($path_info['filename']). '.' . $path_info['extension']);	
		return $s; 

	}
and find this

Code: Select all

$file['name']	= JFile::makeSafe($file['name']);
Replace to

Code: Select all

$file['name']	= JFile::makeSafe(PhocaDownloadFileUpload::realCyrillicTranslit($file['name']));
and all russian files will be upload good to server =)

maybe dear Jan in next updates add this Kludge how plagin, I can't do it this =)

======================
если у вас не загружаются файлы на русском (кириллице), тогда эта тема для вас и этот костыль может пригодиться.
Вам нужно модифицировать файл указанный выше. Нужно просто вставить функцию после класса как указано выше, и все заработает ниже видео на ютубе что все работает. Внимание!!! все модификации файлов ядра компонента вы делаете на свой страх и риск!
======================
https://youtu.be/d3EF4CsWYUQ

24.02.2018 i update function, thanks dmitry_stas / обновил функцию в более хорошую благодаря теме на форуме и dmitry_stas
https://joomlaforum.ru/index.php/topic, ... msg1749800

Re: Can not upload files with Russian (Cyrillic) names...

Posted: 25 Feb 2018, 19:53
by Jan
Hi, great, thank you very much for the info, I will implement it in next version.

Thank you, Jan