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

Phoca Gallery - image gallery extension
fale
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 24 Oct 2012, 21:54

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

Post 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
fale
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 24 Oct 2012, 21:54

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

Post by fale »

" File type is not supported"
Why does not support downloading files with Russian names? How to fix it?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

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

Post 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
If you find Phoca extensions useful, please support the project
fale
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 24 Oct 2012, 21:54

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

Post by fale »

Thank you. What do I need to configure the server to fix the problem?
UTF-8 is scheduled for PhocaGallery?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

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

Post 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
If you find Phoca extensions useful, please support the project
plamen
Phoca Professional
Phoca Professional
Posts: 109
Joined: 16 Mar 2014, 13:23

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

Post by plamen »

Hi,
is there any progress regarding UTF-8 filenames?
I need it for Phoca Download component also.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

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

Post 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:
If you find Phoca extensions useful, please support the project
exbb
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 23 Feb 2018, 21:35

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

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

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

Post by Jan »

Hi, great, thank you very much for the info, I will implement it in next version.

Thank you, Jan
If you find Phoca extensions useful, please support the project
Post Reply