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...
/storage/app/uploads/public/591/1bd/553/5911bd55335df576423432.pdf
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
/storage/app/uploads/mycustomfolder/591/1bd/553/5911bd55335df576423432.pdf
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?
Last updated