added support for setting media type in file names