fix creating preview images in drop folder

This commit is contained in:
Uwe Steinmann 2020-05-22 14:25:07 +02:00
parent 8c19c652b5
commit e718520baa
2 changed files with 5 additions and 1 deletions

View File

@ -11,6 +11,7 @@
- new seeddms logo
- fix moving clipboard (Closes: #473)
- show access rights of folder/document if user has write access
- fix creating preview images of documents in drop folder
--------------------------------------------------------------------------------
Changes in version 5.1.16

View File

@ -48,6 +48,9 @@ $dir = $dropfolderdir.'/'.$user->getLogin();
if(!file_exists($dir.'/'.$filename))
exit;
$finfo = finfo_open(FILEINFO_MIME_TYPE);
$mimetype = finfo_file($finfo, $dir.'/'.$filename);
if(!empty($_GET["width"]))
$previewer = new SeedDMS_Preview_Previewer($settings->_cacheDir, $_GET["width"]);
else
@ -55,7 +58,7 @@ else
$previewer->setConverters($settings->_converters['preview']);
$previewer->setXsendfile($settings->_enableXsendfile);
if(!$previewer->hasRawPreview($dir.'/'.$filename, 'dropfolder/'))
$previewer->createRawPreview($dir.'/'.$filename, 'dropfolder/');
$previewer->createRawPreview($dir.'/'.$filename, 'dropfolder/', $mimetype);
header('Content-Type: image/png');
$previewer->getRawPreview($dir.'/'.$filename, 'dropfolder/');