Finally fixed s3 problem, and now javascript photo upload.