Skip to content

Commit 016fa3d

Browse files
committed
Fix assets upload
1 parent dba32af commit 016fa3d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Fields/Assets.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ class Assets extends Field
1616
{
1717
protected string $view = 'assets';
1818

19+
protected function defaultProperty(mixed $default = null): array
20+
{
21+
/* We need to initialize the value to an empty array for the upload to work. */
22+
return [];
23+
}
24+
1925
protected function multipleProperty(?bool $multiple = null): bool
2026
{
2127
return $multiple ?? $this->field->get('max_files') !== 1;

0 commit comments

Comments
 (0)