[server] check type of uploaded files