improved photo upload