The file.type variable is passed straight through to our transform method, as the first argument. We can call this our…