Minor code cleanup to timeout functionality of upload photo.