Fixes AJAX uploadPhoto request