Added ability to pass own mime