Recent Topics

1 Nov 25, 2014 01:42    

Hi,
Since I update to 5.1 (from 4.x series), I have a lot of problems with filenames.
What is the problem of this name :
<code>«pv-24h-co-20nov2014.doc» n'est pas un nom de fichier valide.</code>
There is no space, no accentuated character.

In settings : file : ^[a-zA-Z0-9\-_]+$

In fact, all my files have a blue ! and a message stating the filename is not valid. I don't remember how I uploaded them, probably via FTP because via b2evo it's impossible.
What can I do? (perms are 775/664)

Thanks
Mel

2 Nov 26, 2014 00:10

Hi @mel_t,

Check if the variable $force_regexp_filename is empty in the file conf/_advanced.php. If it is not empty, its value will override the settings.

Regards!

3 Nov 26, 2014 00:46

Both are empty :
$force_regexp_filename = '';
$force_regexp_dirname = '';

4 Nov 26, 2014 06:47

All right, also double check the settings form ( b2evo > Files > Settings ) and make sure the value of the field Valid filename: is ^[a-zA-Z0-9\-_. ]+$ and not ^[a-zA-Z0-9\-_]+$ as you menitoned before. Actually, the latter must be the value of the field Valid dirname:.

5 Nov 30, 2014 05:17

Better. But I'm unable to get accentuated letters. In fact, by emptying the field, it's work. But I'm wonder why all caps letters are changed, is it a developper choice?
Thanks
Mel

6 Nov 30, 2014 14:31

@mel_t Good practices states the you shouldn't include special characters in you filenames. That's the reason why the regular expression to validate them is done this way ( ^[a-zA-Z0-9\-_. ]+$ ). As you pointed out, if you left the field Valid filename: empty, you can avoid this rule, but it is not recommended at all.

Also, converting all the filenames to lowercase is an automatic and non-customizable action. This way, possible casing conflicts between case sensitive and non-sensitive systems are avoided. So, there is not an "easy" way to get rid of this behavior.

Regards!


Form is loading...