add mime module
add logic based on mime type