예제 #1
0
 /**
  * Get the mimetype of a file
  *
  * @param $path
  * @return array
  */
 public function getMimetype($path)
 {
     $location = $this->prefix($path);
     $mime_type = Util\MimeType::detectMimeType($location);
     return array('mimetype' => $mime_type);
 }
예제 #2
0
 /**
  * Guess MIME Type based on the path of the file and it's content
  *
  * @param  string $path
  * @param  string $content
  * @return string|null     MIME Type or NULL if no extension detected
  */
 public static function guessMimeType($path, $content)
 {
     return Util\MimeType::detectMimeType($path, $content);
 }