Set MIME/resource types automatically on save