add mime module, support auto detect file type to use ascii or binary type