Fix ajax_upload bug if request.is_ajax() is true.
Merge branch 'issue121' into portal