mirror of
https://github.com/grocy/grocy.git
synced 2025-10-14 17:24:07 +00:00
Prepare file upload API (references #58)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user