Uploading files with non-latin names

Flint 13 Oct, 2012
Hello!

First of all, I want to thank you for the great product. I am using Chronoforms and it is probably the best form component for Joomla.

Okay, I have a question about file uploads. I have a File Upload element on the form, but when I upload files that have cyrillic names one of the following happens:
1) If "Safe File Name" is set to "Yes", the file is not uploaded at all and no error messages are given
2) If "Safe File Name" is turned off, the PHP issues some warnings like this:


Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'Z:\tmp\phpD86F.tmp' to 'Z:\home\tabl2.ru\www\components\com_chronoforms\uploads\Order_form\20121014003809_?????.doc' in Z:\home\tabl2.ru\www\libraries\joomla\filesystem\file.php on line 490


And again, no file uploaded.

So my question is: can I inject the code somewhere between form data collection and disk operation? I have already written a function to "translate" cyrillic strings to latin strings, I just need a way to apply it during form processing.

Thank you in advance.
GreyHead 14 Oct, 2012
Hi Flint,

Try adding a custom code action before the Upload Files action to change the file input values to non-Cyrillic versions. I think this will work.

My Upload Files [GH] action allows you more control over the file name than the standard action but I'm not sure it would help in this instance. Let me know if the custom code doesn't work and I'll see if I can add a suitable filter.

Bob
This topic is locked and no more replies can be posted.