fix console err when upload photo