I try to setup two different fileservers, reachable through the following urls:
I would like to handle all the images through the MediaManager, too, so if you enter the MediaManager, all the images stored on images.myurl.com should be visible. For the files, that’s not important.
So, in order to achieve this, I added a new disk within filesystems.php:
'disks' => [ [...local...] 'test' => [ 'driver' => 'ftp', 'host' => 'xxx', 'username' => 'xxx', 'password' => 'xxx', ],
(yes I’ll use env variables here, but since it didnt work yet I didnt do it yet…)
I used this thread as a help reference:
Next, I switched the disk within the storage array in system.php:
'storage' => [ 'uploads' => [ 'disk' => 'test', [...] ], 'media' => [ 'disk' => 'test', [...] ], 'resources' => [ 'disk' => 'test', [...] ], ],
So at that point, I would expect the media manager to upload the new images to the new disk, but it does not. It kinda ignored the disc and always use the local one.
Next, I would also modify the Twig |media filter to point to this image server.
I found this doc:
Telling that with a configured media manager address, the filter works as I would like it to have, but I couldnt find any info where to configure this.
A last point: The ftp connection should go to the folder
/html_images/, not sure how I can set this up.
So… those are my problems with discs, any help is welcome. ^^
I work on Xampp right now and try to use my shared hosting as a disc. Not sure if this is relevant. I once read something that a ftp driver needs to be installed, too, but I didnt find any more info here.