This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

Mohsin
Mohsin

I need the file upload widget to work in a way that everytime a file gets uploaded the filename is taken as title. So I did this..

Opened modules/backend/formwidgets/FileUpload.php And then added code

$file->title = preg_replace('/\.?' . $uploadedFile->getClientOriginalExtension() . '$/', '', $uploadedFile->getClientOriginalName());

But I believe this is the wrong way to do it, in fact when I updated octoberCMS it got erased and I had to do it again. How to do it right?

1-1 of 1

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.