Welcome Guest, Not a member yet? Register   Sign In
Renaming image on upload?
#4

[eluser]codex[/eluser]
Try this:

Code:
if ($this->input->post('mypageupdate')) {        
            
            //     Designers Upload Folder
            $dir = './assets/images/';
            
            $config['upload_path'] = $dir;
            $config['allowed_types'] = 'gif|jpg|png';
            $config['remove_spaces']  = TRUE;
            $config['quality']  = '90';  
            $config['max_size'] = '1000000';
            $this->upload->initialize($config);
            
            if (!$this->upload->do_upload())    {
                $data['error'] = 'There was a problem with your upload!';
            
            } else {
                
                $data = array('upload_data' => $this->upload->data());
                $file = $data['upload_data']['file_name'];
                
                rename($dir . $file, $dir .'test.jpg');
                
            }
        }

If this works, go from there.


Messages In This Thread
Renaming image on upload? - by El Forum - 08-03-2008, 08:59 AM
Renaming image on upload? - by El Forum - 08-03-2008, 09:37 AM
Renaming image on upload? - by El Forum - 08-03-2008, 10:10 AM
Renaming image on upload? - by El Forum - 08-03-2008, 10:15 AM
Renaming image on upload? - by El Forum - 08-03-2008, 10:57 AM
Renaming image on upload? - by El Forum - 08-03-2008, 12:45 PM
Renaming image on upload? - by El Forum - 08-03-2008, 09:47 PM
Renaming image on upload? - by El Forum - 08-04-2008, 05:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB