You forget to pass url var to getMimeType function.

Change ':' by ';' at the end of line