make connection once for uploading all photos