Make sure that the photo object being created is a file