Display CMS: Upload-Fehler abfangen und kaputte Bilder im Player überspringen.
Mediathek-Uploads legen keinen Datensatz mehr an, wenn der Datei-Write fehlschlägt (verhindert 404-Einträge auf den Displays). Der Player überspringt Bilder mit Ladefehler nach 2s statt Schwarzbild zu zeigen. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
2a34adc515
commit
193d37b1ce
6 changed files with 211 additions and 62 deletions
|
|
@ -88,9 +88,16 @@ $handleUploads = function () {
|
|||
$service = app(DisplayMediaService::class);
|
||||
$count = 0;
|
||||
|
||||
foreach ($this->uploads as $file) {
|
||||
$service->storeUpload($file);
|
||||
$count++;
|
||||
try {
|
||||
foreach ($this->uploads as $file) {
|
||||
$service->storeUpload($file);
|
||||
$count++;
|
||||
}
|
||||
} catch (\RuntimeException $exception) {
|
||||
$this->uploads = [];
|
||||
$this->addError('uploads', $exception->getMessage());
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$this->uploads = [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue