This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

roni.sommerfeld
roni.sommerfeld

Hi guys how are you

I am using the builder to generate my screens in October and so far everything is working properly.

But I'm having trouble accessing the files I uploaded.

Example my model:


 'required',
        'type' => 'required'

    ];

    public $attachMany = [
        'files' => 'System\Models\File'
    ];

    public $belongsTo = [
        'category' => [
            Category::class,
            'key' => 'type'
        ]
    ];

    /**
     * @var string The database table used by the model.
     */
    public $table = 'clients';

}

The whole Upload part is being done by the javascript file called "Fileupload.js", so I can add multiple files, I've been noticing that it saves in the table however I can not create a relation to know which files are linked ... Being honest I'm lost in the way that October works with the upload.

I tried to access property:

$model->files->getPath(); or $model->files[0]->getPath();

but it shows error saying that the function getPath() does not exist ...

1-1 of 1

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.