Welcome Guest, Not a member yet? Register   Sign In
PNG upload
#1
Photo 
(This post was last modified: 06-17-2017, 03:12 AM by Midhun Mohanan P.)

Hi,

Attempting to upload a PNG picture(in the image link) and it is not allowing it to upload. I am able to upload other PNG images.
I can't upload picture in codeigniter forum attachment .

Image link : https://drive.google.com/open?id=0Bz2laj...FNrN1RzWXc

This is my image upload code.

PHP Code:
$config['upload_path'] = FCPATH.'public/images/pins/';
 
$config['allowed_types'] = 'png|gif|jpg|jpeg';

 
$this->load->library('upload'$config);
 if (! 
$this->upload->do_upload("file")) {
 echo 
"invalid";
 
//echo json_encode($FILES['file']['type']);
 
}
 else
 {
 
$image=$this->upload->data();
 
$image_name=$image['file_name'];
 echo 
json_encode($image_name);
 } 
Practice | Practice | Practice
Reply


Messages In This Thread
PNG upload - by Midhun Mohanan P - 06-16-2017, 11:36 PM
RE: PNG upload - by Diederik - 06-17-2017, 12:05 AM
RE: PNG upload - by Midhun Mohanan P - 06-17-2017, 01:28 AM
RE: PNG upload - by Martin7483 - 06-17-2017, 11:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB