Added the ability to pass $config['file_name'] for the File Uploading Class and rename the uploaded file.
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php
index 6309cae..03a7b21 100644
--- a/system/libraries/Upload.php
+++ b/system/libraries/Upload.php
@@ -911,11 +911,11 @@
{
return $filename;
}
-
+
$parts = explode('.', $filename);
$ext = array_pop($parts);
$filename = array_shift($parts);
-
+
foreach ($parts as $part)
{
if ($this->mimes_types(strtolower($part)) === FALSE)
@@ -928,7 +928,8 @@
}
}
- // file name override
+ // file name override, since the exact name is provided, no need to
+ // run it through a $this->mimes check.
if ($this->file_name != '')
{
$filename = $this->file_name;