• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with Upload config file_name

#1
[eluser]old_guy[/eluser]
I'm experiencing a problem with the changing the file name within the upload config array. My code is as follows;
Code:
$config= array(
            'upload_path'=> './uploads/',
            'allowed_types'=> 'csv',
            'file_name'=> 'test.csv',
            'overwrite'=> FALSE,
            'remove_spaces'=> TRUE,
            );
$this->load->library('upload', $config);
The upload function works fine. The $conifg array contains the right file name
Code:
./uploads/ [allowed_types] => csv [file_name] => test.csv [overwrite] => [remove_spaces] => 1 )

Checking the uploaded data I get the following:
Code:
Array
(
    [file_name] => csvTest.csv
    [file_type] => text/tsv
    [raw_name] => csvTest
    [orig_name] => csvTest.csv
    [file_ext] => .csv
)
The file name does not change. The file gets uploaded with its original name.

Any help discovering why this is occurring would be greatly appreciated.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.