-4

I made a form to upload a file, it was working, but when I made a few tests there was sometimes where it didn't worked very well, after hours arguing against my own code I notice that the problem was the name of the file I was trying to upload, it had parentheses like blablabla(1).png,

what can I do to avoid this trouble?

Thanks in advance.

  • 1
    Possible duplicate of [Best method to generate unique filenames when uploading files PHP](https://stackoverflow.com/questions/4371941/best-method-to-generate-unique-filenames-when-uploading-files-php) – USER249 Jun 10 '18 at 23:06

1 Answers1

0

You can use javascript regular expression to replace those invalid symbols that can cost error for your uploading file before submitting it.

  • This isn't a great answer really, sorry. You've not really given the solution with code, just a pointer in the right direction, which should be a comment. – James Jun 11 '18 at 00:06