Prepare file upload API (references #58)

This commit is contained in:
Bernd Bestel
2018-09-27 14:01:00 +02:00
parent 596dc9e36d
commit 9c2c2c1fa2
5 changed files with 142 additions and 0 deletions

View File

@@ -178,3 +178,13 @@ function Pluralize($number, $singularForm, $pluralForm)
}
return $text;
}
function IsValidFileName($fileName)
{
if(preg_match('#^[a-z0-9]+\.[a-z]+?$#i', $fileName))
{
return true;
}
return false;
}