I store uploaded files on the server by renaming them using
CreateUUID() & '.' & clientFileExt to ensure a unique name is generated that is acceptable on the file system, and then associate the generated name with a user provided label like "Initial contract" - whatever they indicate in the file name field I provide with the upload field - in the database record of the uploaded file.
Advantages:
a) don't have to mess with ensuring a user provided file name is unique and works for the file system, and
b) the name they give it is decoupled from the name of the file on the file system, so it can be anything, using characters in any language, even a long phrase or sentence to help them remember what the file is.