Implemented the progress bar when uploading photos