[WIP] Media archive and files attaching fixes