Add file_type check on client&server side.