Change from $type to $id in FileType