view photo and upload functional