public function prependMimeToPath($path, $mimeType) { $res = substr($mimeType, 0, strpos($mimeType, '/')) . '/' . $path; return $res; }