[eluser]felixk[/eluser]
Hey!
I've coded a image upload function and thumbnail creator. And it works well when I'm running it from my local server, but I've now moved it to another server, which causes the problem.
This is parts from my code!
Code:
// This part works!
$config['upload_path'] = './uploads/';
$config['allowed_types'] = 'gif|jpg|jpeg|png';
$this->load->library('upload', $config);
// Here comes the problem
$root = "/Fredag/uploads/";
//Array med alla uppladdningsinformation från "steg 1".
$upload_data = $this->upload->data();
// ------ STEG 2 ----- //
$config['image_library'] = 'gd2';
$config['source_image'] = $_SERVER['DOCUMENT_ROOT'].$root.$upload_data['orig_name'];
$config['create_thumb'] = TRUE;
$config['thumb_marker'] = ''; //ändelse innan filformatändelsen. (satt till noll)
$config['new_image'] = $_SERVER['DOCUMENT_ROOT'].$root.'images/';
Quote:$_SERVER['DOCUMENT_ROOT'] = E:/www/fabrikenfredag.se/www
And the destination folder is E:www/fabrikenfredag.se/www/Fredag/uploads (/images/thumbs)
To sum up, the image is uploaded, but not resized. So it must be a problem to find the source image.
Thankful for help!