Sanitize uploaded files names

General project discussion. NOT for help questions.
Post Reply
pierrepercee
Forum Members
Forum Members
Posts: 152
Joined: Thu Jan 10, 2013 8:02 am

Sanitize uploaded files names

Post by pierrepercee »

Hello,

For end users, upload errors due to file names containing special characters are annoying. I am not a developer but it would be more efficient to create and allow the calling of a class from the different modules rather than implementing it individually for each module.
Getting rid of this problem once and for all would be a real plus.
It's always a compromise obviously but
I looked at a function there that seems pretty well done:
https://developer.wordpress.org/referen ... file_name/
There is abundant literature on these questions, but it is imperative that:
at a minimum the CMS warns of an error in the file name before uploading
better, that it processes the name of the file to be uploaded as accurately as possible.
I'm writing this post because a customer is having difficulty with Lise's upload field. As I know that Tinymce updates are being prepared behind the scenes, I believe that setting up this type of verification each time a file / image must be uploaded would be a real plus. After all, Made Simple, this must be verified in use
Post Reply

Return to “General Discussion”