I am using Fine uploader to upload images. I include javascript from GitHub. I include:
- jquery-1.8.3.min.js
- util.js
- button.js
- handler.base.js
- handler.form.js
- handler.xhr.js
- uploader.basic.js
- dnd.js
I want to use it as Fine Uploader Basic (FUB) because it's easy customize.
Below is my server code in PHP just return json:
$result = array("success"=>true, "id"=>"001", "name"=>"dararath");
header("Content-Type: text/plain");
echo json_encode($result);
It work fine in Chrome, Firefox and IE 9 but IE 8 and 7 show save dialog instead of json.
- Does my include of javascript correct?
- Does my php json error or have any code in Fine Uploader to correct this behavior, because in it's example test on IE 7 and IE 8 work fine?
Update (2016-07-21)
I need to change header to solve the problem.
$result = array("success"=>true, "id"=>"001", "name"=>"dararath");
header("Content-Type: application/json");
echo json_encode($result);