Avoid checking supported mime types or file suffixes in multiple places

Change-Id: I47d24070c7bda385cd1d7fa1f6a75dbb1f82b476
3 files changed