I have a plugin with attachMany relationship that attaches a file
public $attachMany = [ 'documents' => ['System\Models\File', 'order' => 'sort_order', 'delete' => true] ];
As a test it uploads to this directory...
I can set to public or protected. When I set to protected I can only see through the backend. Public I can see but I want to restrict them. In the backend I can see there is only those directories.
How can I extend the file modal so I can save to
and still keep the file functionality? i.e still save to system_files table and use $file->path etc
Also in my plugins routes.php. I can never seem to override an image url that is stored. Is there a way of overriding the image?
Thanks for the reply,
The issue with changing the upload path is that would affect every upload. The thing I am trying to do is create a new directory other than public or protected from a plugin. The reason is that I am trying to create a folder that is accessible only by user roles.
I could just create a directory inside my plugin directory but I want to use the system_files table. But I am not sure about the logic or best way to do this.
1-3 of 3