Uploaded file names converted to lowercase but not in database
When I upload an image in the CMS it saves the filename to the database using the actual filename but when it actually uploads the image it converts it to all lowercase.
In my form_fields function in my model I have the following two lines
$upload_path = assets_server_path('graphics/', 'images');
$fields['file_name'] = array('type' => 'file', 'upload_path' => $upload_path, 'overwrite' => TRUE);
How can I ensure that the are both the same?
Thanks
Comments
... $upload_path = assets_server_path('graphics/', 'images'); $fields['file_name'] = array('label' => 'File name'); $fields['file_name_upload'] = array('label' => '... OR upload a file', 'type' => 'file', 'upload_path' => $upload_path, 'overwrite' => TRUE);
Is there any solution to this?
$posted[$tmp_field_name] = url_title($field_value, 'underscore', TRUE); $posted[$field_name] = url_title($field_value, 'underscore', TRUE);
to this:
$posted[$tmp_field_name] = url_title($field_value, 'underscore', FALSE); $posted[$field_name] = url_title($field_value, 'underscore', FALSE);
It seems to solve the issue with the filename capitalization. The only issue im having now is that when I have a filename called "Abc_123.jpg", if i use fuel_var(), the filename turns to "Abc 123.jpg".
Do you know how I can get around this?