Behebe Player, Download-Namen und ergänze Profil, Fußzeile und Lizenzhinweis
- app.js: Der Anfangsscan übergab das Dokument, das kein Element ist; HLS-Filme im Quelltext wurden nie angebunden. Vollbild findet sein Video auch neben dem Player. - Download und Ansicht heißen nach dem Anzeigetitel statt „laden.mp4“. - Mitgliederprofil: Name, E-Mail mit Bestätigung der neuen Adresse, Passwort, Rechnungsadresse (ADR-46). - Kleine Fußzeile mit Rechtlichem aus der CMS-Navigation. - Lizenzdetail nennt, dass Einzel-/Mehrfachlizenz nicht festgelegt ist (Funktion gibt es noch nicht). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
433f9aee61
commit
e7efb073da
20 files changed
+879
-49
No files matched your search
@@ -447,10 +447,34 @@ private function fileResponse(
|
||||
'k0',
|
||||
);
|
||||
|
||||
return $disk->response($file, basename($file), [
|
||||
'Content-Disposition' => $action === 'laden' ? 'attachment' : 'inline',
|
||||
'X-License-Copy' => $delivery->copy_id,
|
||||
]);
|
||||
// Dateiname aus dem Anzeigetitel statt aus der Adresse („laden.mp4“); Laravel setzt Content-Disposition mit
|
||||
// ASCII-Rückfall und UTF-8-Name.
|
||||
return $disk->response(
|
||||
$file,
|
||||
$this->downloadName($version, $file),
|
||||
['X-License-Copy' => $delivery->copy_id],
|
||||
$action === 'laden' ? 'attachment' : 'inline',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Dateiname für Ansicht und Download: Anzeigetitel des Mediums (Mitgliedertext, sonst Arbeitstitel) mit der
|
||||
* Endung der gespeicherten Datei. Zeichen, die in Dateinamen nicht erlaubt sind, entfallen.
|
||||
*/
|
||||
private function downloadName(ContentElementVersion $version, string $file): string
|
||||
{
|
||||
$element = $version->element;
|
||||
$title = $element === null ? '' : app(LibraryCatalog::class)->text($element)['title'];
|
||||
$title = (string) preg_replace('/[\x00-\x1F\x7F\/\\\\:*?"<>|]+/u', ' ', $title);
|
||||
$title = trim((string) preg_replace('/\s+/u', ' ', $title));
|
||||
$title = rtrim(mb_substr($title, 0, 120), '. ');
|
||||
$extension = strtolower(pathinfo($file, PATHINFO_EXTENSION));
|
||||
|
||||
if ($title === '') {
|
||||
return basename($file);
|
||||
}
|
||||
|
||||
return $extension === '' ? $title : $title.'.'.$extension;
|
||||
}
|
||||
|
||||
private function renditionBelongsTo(int $versionId, string $path): bool
|
||||
|
||||
Reference in new issue
Block a user