Shortening long file name on upload
-
Hello dear WordPress Community,
I am running a WordPress 4.2.2 in multisite (subdomain).
Some of my users still don’t understand after many emails that very long name for files (e.g: pictures) are a pain for the server, in particular for the backup script. Maybe they just don’t know how to rename a file on their computer before uploading. Anyway.
I would like to find a way to force WordPress to rewrite the filenames on upload. I found some plugins to rewrite without special characters, but no plugin that will allow a limit (e.g: 10 characters maximum).
Would you know something I can add to my wp-config, or a quick function that would allow that ? And of course, it need to be compatible with multisite, if possible with only the network admin being able to fix the number of maximum charaters.
Can’t wait to read your ideas,
Antoine
- The topic ‘Shortening long file name on upload’ is closed to new replies.