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
|
|
@ -69,8 +69,15 @@ class DisplayMediaPicker extends Component
|
|||
$service = app(DisplayMediaService::class);
|
||||
$lastMedia = null;
|
||||
|
||||
foreach ($this->quickUploads as $file) {
|
||||
$lastMedia = $service->storeUpload($file);
|
||||
try {
|
||||
foreach ($this->quickUploads as $file) {
|
||||
$lastMedia = $service->storeUpload($file);
|
||||
}
|
||||
} catch (\RuntimeException $exception) {
|
||||
$this->quickUploads = [];
|
||||
$this->addError('quickUploads', $exception->getMessage());
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$this->quickUploads = [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue