4
You need to make changes in file class/uploader.php
Line 354:
le="color: #000000"><?php if (isset($this->targetFileName)) { $this->savedFileName = $this->targetFileName; } else if (isset($this->prefix)) { $this->savedFileName = uniqid($this->prefix) . '.' . strtolower($matched[1]); } else { $this->savedFileName = strtolower($this->mediaName); }
If you want to use file name:
le="color: #000000"><?php if (isset($this->targetFileName)) { $this->savedFileName = $this->targetFileName; } else { $this->savedFileName = strtolower($this->mediaName); }
Will save as: 'the_file_name.jpg'
If you want to use both file name and prefix (you should use this to prevent overwrite an already existing image with the same file name):
le="color: #000000"><?php if (isset($this->targetFileName)) { $this->savedFileName = $this->targetFileName; } else if (isset($this->prefix)) { $this->savedFileName = strtolower(str_replace($matched[0], '', $this->mediaName) . '-' . uniqid($this->prefix) . $matched[0]); } else { $this->savedFileName = strtolower($this->mediaName); }
Will save as: 'the_file_name-img50b558777727d.jpg'