How to rename uploaded files
Using Drupal 8, I want to rename and clean all filenames, e.g. If someone uploads file named like this Screen Shot 2016-03-29 at 1.13.21 PM.jpg
, I want to clean it so that convert all spaces to dashes -
and make everything lowercase, So I should get screen-shot-2016-03-29-at-1.13.21-pm.jpg
.
I want to do this on image upload dialog form of CKEditor
.
This article was republished from its original source.
Pixeldust is a 20-year-old web development agency specializing in Drupal and WordPress and working with clients all over the country. With our best in class capabilities, we work with small businesses and fortune 500 companies alike. Give us a call at 1(800)730-2416 and let’s talk about your project.