Detect mime type on runtime instead of hardcoding.