IE 6 JSON response handling in blueimp jquery file uploader
-
06-02-2021 - |
题
I have implemented blueimp jquery file uploader
and is running fine on all browsers except IE6 :(.
It is not handling JSON response from the uploads_controller#create
method. It gives JSON file with response for download.
Please help me to sort this issue..
解决方案
Doing it following way resoles the issue
content_type = request.env['HTTP_ACCEPT'].split(',').include?("application/json") ? "application/json" : "text/html"
respond_to do |format|
format.html
format.json{render :json => [ @attached_file.to_jq_upload ].to_json, :content_type => content_type}
end`
不隶属于 StackOverflow