[CORE][GSFile] Change actor_id paramenter of validateAndStoreFileAsAttachment to optional and reorder them and their usages

This commit is contained in:
2021-08-03 10:11:48 +00:00
parent 7bd88bd101
commit 88dd9e542f
3 changed files with 14 additions and 6 deletions

View File

@@ -116,9 +116,11 @@ END;
$processed_attachments = [];
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()),
is_local: true, actor_id: $actor_id
$f,
dest_dir: Common::config('attachments', 'dir'),
actor_id: $actor_id,
title: Security::sanitize($f->getClientOriginalName()),
is_local: true
);
}