Upgrade to 3.9.3
This commit is contained in:
@@ -162,10 +162,9 @@ return [
|
||||
}
|
||||
|
||||
// count all uploaded files
|
||||
$total = count($this->data);
|
||||
$max = $this->max ? $this->max - $total : null;
|
||||
$max = $this->max ? $this->max - $this->total : null;
|
||||
|
||||
if ($this->max && $total === $this->max - 1) {
|
||||
if ($this->max && $this->total === $this->max - 1) {
|
||||
$multiple = false;
|
||||
} else {
|
||||
$multiple = true;
|
||||
@@ -179,7 +178,10 @@ return [
|
||||
'max' => $max,
|
||||
'api' => $this->parent->apiUrl(true) . '/files',
|
||||
'attributes' => array_filter([
|
||||
'sort' => $this->sortable === true ? $total + 1 : null,
|
||||
// TODO: an edge issue that needs to be solved:
|
||||
// if multiple users load the same section at the same time
|
||||
// and upload a file, uploaded files have the same sort number
|
||||
'sort' => $this->sortable === true ? $this->total + 1 : null,
|
||||
'template' => $template
|
||||
])
|
||||
];
|
||||
|
Reference in New Issue
Block a user