Halte ungenutzte Medien bearbeitbar und lege Dateien direkt im Modul an.
Eine Fassung wird erst unveränderlich, wenn sie freigegeben und verwendet wird. Das Auge am Listeneintrag öffnet die Vorschau. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
1fb48783bf
commit
c73207f2c3
11 files changed
+547
-25
No files matched your search
@@ -63,14 +63,24 @@ public function handle(): void
|
||||
}
|
||||
|
||||
$metadata = $version->metadata ?? [];
|
||||
unset($metadata['incoming']);
|
||||
$hold = ($metadata['hold'] ?? false) === true;
|
||||
unset($metadata['incoming'], $metadata['hold']);
|
||||
$metadata['file'] = $target;
|
||||
|
||||
if ($hold) {
|
||||
$metadata['held'] = true;
|
||||
}
|
||||
|
||||
$version->metadata = $metadata;
|
||||
$version->content_hash = hash('sha256', json_encode([
|
||||
'body' => $version->body,
|
||||
'metadata' => $metadata,
|
||||
], JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE));
|
||||
$version->status = ContentVersionStatus::Bereit;
|
||||
|
||||
if (! $hold) {
|
||||
$version->status = ContentVersionStatus::Bereit;
|
||||
}
|
||||
|
||||
$version->save();
|
||||
DeriveThumbnail::dispatch('element', $version->content_element_id);
|
||||
DeriveFilmRenditions::dispatch($version->id);
|
||||
|
||||
Reference in new issue
Block a user