working on photo upload with js