Special characters not saved in uploaded file names

Although this should not be happening (RSForm!Pro has no issues in accepting special characters), some users find themselves in the situation where the names of uploaded files should contain special characters but get saved on the server (or get downloaded from the submission listings) with those characters replaced.

There are a number of factors that may cause this problem, all of them not being dependent on RSForm!Pro: the hosting server, the operating system of the hosting server / user, the browser used for the submission to name a few. There are some workarounds for this type of situation:

Instruct your users to avoid special characters


You can simply edit the file upload field and notify the form submitters to avoid the use of this type of characters:

Use a PHP Script


Please the following script in Components >> RSForm!Pro >> Manage Forms >> edit your form >> Properties >> PHP Scripts >> Script called on form process:

 
$language = JFactory::getLanguage();
foreach ($_FILES['form']['name'] as $i => $filename) {
$_FILES['form']['name'][$i] = $language->transliterate($filename);
}
 

This script will strip the special characters and replace them with alphanumeric ones.


One person found this article helpful.


Was this article helpful?

Yes No
Sorry about that

You Should Also Read

Uploads are not working HOT

How can I control the prefix of uploaded files

Uploaded files are not being attached to emails

File Upload fields do not work in Safari on iOS