Refactor PhotoStore::Upload.