Welcome Guest, Not a member yet? Register   Sign In
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.


Messages In This Thread
Problem with Upload config file_name - by El Forum - 11-30-2010, 11:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB