Fix some code quality things.

This commit is contained in:
James Cole
2021-12-17 17:27:01 +01:00
parent 4ca9ee6eec
commit 32d7a0fd1b
9 changed files with 14 additions and 79 deletions

View File

@@ -176,7 +176,9 @@ class AttachmentHelper implements AttachmentHelperInterface
return false;
}
// is allowed? Save the file, without encryption.
$this->uploadDisk->put($attachment->fileName(), $content);
$parts = explode('/', $attachment->fileName());
$file = $parts[count($parts) - 1];
$this->uploadDisk->put($file, $content);
// update attachment.
$attachment->md5 = md5_file($path);