XUpload - Strip bad characters from file name

Posts: 4
Joined: Dec 10, 2010 7:35 pm

Strip bad characters from file name

#1 Postby TheCosmonaut » Feb 02, 2011 5:09 pm

Hi there!

I'm wondering how to strip illegal characters from uploaded file names. For example, people can upload files with # ' " $ @ & and spaces in them and they get dropped into the upload directory with those names intact. I know the trick must be in the SaveFile function but I just don't know enough CGI to hack this together well.

Any suggestions?



Return to “XUpload”