It looks like you're new here. If you want to get involved, click one of these buttons!
if (isset($posted[$file_tmp.'_filename']))
{
// get file extension
$path_info = pathinfo($file_info['name']);
$field_value = $posted[$file_tmp.'_filename'].'.'.$path_info['extension'];
}
Comments
$fields['myfield_upload'] = array('type' => 'file', 'upload_path' => $this->upload_path, 'overwrite' => TRUE, 'after_html' => $file_after_html, 'order' => 1000, 'label' => 'File', 'filename' => "test");
The file is uploaded with the correct name: "test.pdf" but the "myfield" column in the database is updated to just "test" -- without the extension.
https://github.com/daylightstudio/FUEL-CMS/commit/ef5e01f0b777abf103d331b92f3b14117aeecd16