Skip to content
Snippets Groups Projects
Commit 964d0a80 authored by Giovannoni Laurent's avatar Giovannoni Laurent
Browse files

FIX #3024

parent 8a5c26ee
No related branches found
No related tags found
No related merge requests found
......@@ -477,7 +477,7 @@ function Ds_setRights($dest)
}
/**
* get the mime type of a doc
* get the mime type of a file with a path
* @param $filePath path of the file
* @return string of the mime type
*/
......@@ -487,6 +487,17 @@ function Ds_getMimeType($filePath)
return MIME_Type::autoDetect($filePath);
}
/**
* get the mime type of a file with a buffer
* @param $fileBuffer buffer of the file
* @return string of the mime type
*/
function Ds_getMimeTypeWithBuffer($fileBuffer)
{
$finfo = new finfo(FILEINFO_MIME);
return $finfo->buffer($fileBuffer);
}
/**
* del tmp files
* @param $dir dir to wash
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment