get new method getRealMimeType()

This commit is contained in:
Uwe Steinmann 2024-08-12 09:49:06 +02:00
parent 13d9717f74
commit 154ec361ed

View File

@ -659,7 +659,7 @@ switch($command) {
if($content) { if($content) {
$document = $content->getDocument(); $document = $content->getDocument();
if ($document->getAccessMode($user) >= M_READWRITE) { if ($document->getAccessMode($user) >= M_READWRITE) {
$realmimetype = SeedDMS_Core_File::mimetype($dms->contentDir . $content->getPath()); $realmimetype = $content->getRealMimeType();
if (!$content->setMimeType($realmimetype)) { if (!$content->setMimeType($realmimetype)) {
header('Content-Type: application/json'); header('Content-Type: application/json');
echo json_encode(array('success'=>false, 'message'=>'Error setting mimetype', 'data'=>'')); echo json_encode(array('success'=>false, 'message'=>'Error setting mimetype', 'data'=>''));