height: 26px;
border-radius: 3px 3px 0 0;
background: #b50005;
- z-index:21;
+ z-index: 21;
cursor: pointer;
}
if (!isset($files[$collection])) {
$files[$collection] = [];
}
+
+ $full = null;
+ $thumb_url = null;
+
+ try {
+ $full = $media->getUrl();
+ } catch (Exception $e) {
+ $full = '';
+ }
+
+ try {
+ $thumb_url = $media->getUrl($field['thumb_collection'] ?? '');
+ } catch (Exception $e) {
+ $thumb_url = '';
+ }
+
+
$files[$collection][] = [
'id' => $media->id,
'order_column' => $media->order_column,
'size' => $media->size,
'name' => $media->file_name,
- 'full_url' => $media->getUrl(),
- 'thumb_url' => $media->getUrl($field['thumb_collection'] ?? ''),
+ 'full_url' => $full,
+ 'thumb_url' => $thumb_url
];
}