Fix ajax_upload bug if request.is_ajax() is true.