4
You need to make changes in file class/uploader.php
Line 354:
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:
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):
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'