简体   繁体   中英

Blueimp Codeigniter image upload ajax 500 internal server error

I am trying to implement blueimp to my codeigniter project for multiple image upload of images. i am facing 500 (internal server error) i know this appears if we have any error in our php script. in my php script i am getting response as {"files":[]} to represent no of img's which are present in my img_upload folder. it have to return null object thats true but

in my console i am getting a error as the below image. 在此处输入图片说明

as i clicked on anonymous function Here in my.js redirecting me to below function.

        $.ajax({
        // Uncomment the following to send cross-domain cookies:
        //xhrFields: {withCredentials: true},
        url: $('#fileupload').fileupload('option', 'url'),
        dataType: 'json',
        context: $('#fileupload')[0]
    }).always(function () {
        $(this).removeClass('fileupload-processing');
    }).done(function (result) {
        $(this).fileupload('option', 'done')
            .call(this, $.Event('done'), {result: result});
    });

what i am thinking is this might be issue with return type html or json but not able to to get how to fix this issue. how can i solve this issue so i can upload image without getting internal error. Thanks in advance.

I am following the following github wiki and my code is same to same.

This blog

may be its php.ini problem

Open your php.ini file

search for extension=php_fileinfo.dll

if you are using xampp it may be commented by default

change

;extension=php_fileinfo.dll

to

extension=php_fileinfo.dll

and restart your xampp...

this was solve my problem

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM