Created method for uploading a file in GalleryManager.