Browse Source

Recalculate filesize after stripping metadata

main
discomrade 3 years ago
committed by discomrade
parent
commit
617a924826
  1. 8
      post.php

8
post.php

@ -1016,9 +1016,13 @@ if (isset($_POST['delete'])) {
if ($config['redraw_image'] || (!@$file['exif_stripped'] && $config['strip_exif'] && ($file['extension'] == 'jpg' || $file['extension'] == 'jpeg'))) {
if (!$config['redraw_image'] && $config['use_exiftool']) {
if($error = shell_exec_error('exiftool -overwrite_original -ignoreMinorErrors -q -q -all= ' .
escapeshellarg($file['tmp_name'])))
if($error = shell_exec_error('exiftool -overwrite_original -ignoreMinorErrors -q -q -all= ' . escapeshellarg($file['tmp_name']))) {
error(_('Could not strip EXIF metadata!'), null, $error);
} else {
clearstatcache(true, $file['tmp_name']);
if (($newfilesize = filesize($file['tmp_name'])) !== false)
$file['size'] = $newfilesize;
}
} else {
$image->to($file['file_path']);
$dont_copy_file = true;

Loading…
Cancel
Save