N
N
Nikita Filatov2015-08-24 13:26:04
ubuntu
Nikita Filatov, 2015-08-24 13:26:04

How to solve problem with root in ubuntu and need to change images from website?

I'm trying to upload images to the admin panel as in this video https://youtu.be/EgjHlT_ExSw?t=17m2s gives the same error, but nothing changes when changing write permissions, there may be some other reasons for this error.
Project - the projects model

<?php namespace App;

use Illuminate\Database\Eloquent\Model;

class Project extends Model {

  protected $table = 'projects';

    public function galleries()
    {
        return $this->hasMany('\App\Gallery');
    }
}

<?php
return [
    'title' => 'Projects',
    'single' => 'project',
    'model' => '\App\Project',
    'columns' => [
        'id',
        'active',
        'title'
    ],
    'edit_fields' =>[
        'active' =>[
            'type' => 'bool'
        ],
        'title' => [
            'type' => 'text'
        ],
        'slug' => [
            'type' => 'text'
        ],
        'content' => [
            'type' => 'wysiwyg'
        ],
        'image' => [
            'type' => 'image',
            'location' => public_path().'/uploads/project/original',
            'sizes' => [
                [500, 500, 'auto', public_path().'/uploads/project/medium/', 100],
                [1000, 800, 'auto', public_path().'/uploads/project/large/', 100]
            ]
        ]
    ],
    'form_width' => 800,
];

If you remove the lines
'sizes' => [
                [500, 500, 'auto', public_path().'/uploads/project/medium/', 100],
                [1000, 800, 'auto', public_path().'/uploads/project/large/', 100]
            ]
        ]

then the image is loaded but not sliced.
UPD1
config file of another menu item where everything loads fine
<?php

return [
    'title' => 'Slides',
    'single' => 'slide',
    'model' => '\App\Slider',
    'columns' =>[
        'id',
        'active',
        'image' =>[
            'output' => '<img src="/uploads/slides/small/(:value)" />'
        ]
    ],
    'edit_fields' =>[
        'active' =>[
            'type' => 'bool'
        ],
        'weight' => [
            'type' => 'number'
        ],
        'image' => [
            'type' => 'image',
            'location' => public_path().'/uploads/slides/original/',
            'sizes' => [
                [100, 100, 'auto', public_path().'/uploads/slides/small/', 100],
                [1000, 800, 'auto', public_path().'/uploads/slides/large/', 100]
            ],
        ]
    ]
];

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily, 2015-08-24
@DobriyJuk

Perhaps you should assign a different owner? For example on apache:apache?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question