switched switch statement in static method to use mime package to determine mime type of file