normalize line ending to LF
handle deletion of collection metas and media in db instead of controller