[Media] Support any kind of thumbnails in the Core

Sanitize Attachments instead of Validate (part 1)
Ensure the intended filetypes and mimetypes during Vips conversions (part 1)
Various bug fixes
This commit is contained in:
2021-07-22 20:56:29 +01:00
parent 143ecea376
commit 832a5c0bd9
5 changed files with 151 additions and 64 deletions

View File

@@ -114,7 +114,7 @@ END;
]);
$processed_attachments = [];
foreach ($attachments as $f) {
foreach ($attachments as $f) { // where $f is a Symfony\Component\HttpFoundation\File\UploadedFile
$processed_attachments[] = GSFile::validateAndStoreFileAsAttachment(
$f, Common::config('attachments', 'dir'),
Security::sanitize($f->getClientOriginalName()),