first item of array should be read due to dropzone returns always an array of files
This commit is contained in:
		@@ -79,7 +79,7 @@ class CreateCompany extends Job
 | 
			
		||||
    protected function updateSettings()
 | 
			
		||||
    {
 | 
			
		||||
        if ($this->request->file('logo')) {
 | 
			
		||||
            $company_logo = $this->getMedia($this->request->file('logo'), 'settings', $this->company->id);
 | 
			
		||||
            $company_logo = $this->getMedia($this->request->file('logo')[0], 'settings', $this->company->id);
 | 
			
		||||
 | 
			
		||||
            if ($company_logo) {
 | 
			
		||||
                $this->company->attachMedia($company_logo, 'company_logo');
 | 
			
		||||
 
 | 
			
		||||
@@ -34,7 +34,7 @@ class CreateItem extends Job
 | 
			
		||||
 | 
			
		||||
            // Upload picture
 | 
			
		||||
            if ($this->request->file('picture')) {
 | 
			
		||||
                $media = $this->getMedia($this->request->file('picture'), 'items');
 | 
			
		||||
                $media = $this->getMedia($this->request->file('picture')[0], 'items');
 | 
			
		||||
 | 
			
		||||
                $this->item->attachMedia($media, 'picture');
 | 
			
		||||
            }
 | 
			
		||||
 
 | 
			
		||||
@@ -79,7 +79,7 @@ class UpdateCompany extends Job
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if ($this->request->file('logo')) {
 | 
			
		||||
                $company_logo = $this->getMedia($this->request->file('logo'), 'settings', $this->company->id);
 | 
			
		||||
                $company_logo = $this->getMedia($this->request->file('logo')[0], 'settings', $this->company->id);
 | 
			
		||||
 | 
			
		||||
                if ($company_logo) {
 | 
			
		||||
                    $this->company->attachMedia($company_logo, 'company_logo');
 | 
			
		||||
 
 | 
			
		||||
@@ -36,7 +36,7 @@ class UpdateItem extends Job
 | 
			
		||||
 | 
			
		||||
            // Upload picture
 | 
			
		||||
            if ($this->request->file('picture')) {
 | 
			
		||||
                $media = $this->getMedia($this->request->file('picture'), 'items');
 | 
			
		||||
                $media = $this->getMedia($this->request->file('picture')[0], 'items');
 | 
			
		||||
 | 
			
		||||
                $this->item->attachMedia($media, 'picture');
 | 
			
		||||
            }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user