first item of array should be read due to dropzone returns always an array of files

This commit is contained in:
Sevan Nerse
2021-01-17 16:52:27 +03:00
parent fe97d51e49
commit ec1053bb00
10 changed files with 10 additions and 10 deletions

View File

@@ -43,7 +43,7 @@ class CreateDocument extends Job
// Upload attachment
if ($this->request->file('attachment')) {
$media = $this->getMedia($this->request->file('attachment'), Str::plural($this->document->type));
$media = $this->getMedia($this->request->file('attachment')[0], Str::plural($this->document->type));
$this->document->attachMedia($media, 'attachment');
}