find_by_file was looking up by file and returning the first one that had that = thus any repeated file uploads of images were failing