You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know, that there is a MountManager, but introducing different "protocols" (the part before the : in an URI) isn't, what "mounting" actually means. I'd expect something like
So writiting to /path/to/images/foo.png actually pushes the changes to S3, while /path/to/backup/dump.sql uses the local file system. Note, that this is an example and can differ from the actual implementation, but the point is, that I could define "protocols" regarding their use case. For example I can define a "backup"-filesystem, but redirect some of the files to backup to a different storage. And even better I can change adapter at will, when requirements changes, without the need to change the code, that makes use of it. This is especially useful with #126
A different example utilizing the MountManager
$local = newLeague\Flysystem\Filesystem($localAdapter);
// Add them in the constructor$manager = newLeague\Flysystem\MountManager(array(
'backup' => $local,
));
$manager->mount('backup', '/dbdumps', $databaseS3);
$manager->mount('backup', '/images', $ImagesS3);
So why not using different protocols for db-dumps and images? Thats definitely a solution, but lets imagine I know want to split up images into user-images and cms-images. It is much easier to reconfigure the FS, so that /images/users and /images/cms write to different locations, than to rewrite the application to use images_user:/ and images_cms:/.
The text was updated successfully, but these errors were encountered:
I know, that there is a
MountManager
, but introducing different "protocols" (the part before the:
in an URI) isn't, what "mounting" actually means. I'd expect something likeSo writiting to
/path/to/images/foo.png
actually pushes the changes to S3, while/path/to/backup/dump.sql
uses the local file system. Note, that this is an example and can differ from the actual implementation, but the point is, that I could define "protocols" regarding their use case. For example I can define a "backup"-filesystem, but redirect some of the files to backup to a different storage. And even better I can change adapter at will, when requirements changes, without the need to change the code, that makes use of it. This is especially useful with #126A different example utilizing the
MountManager
So why not using different protocols for db-dumps and images? Thats definitely a solution, but lets imagine I know want to split up images into user-images and cms-images. It is much easier to reconfigure the FS, so that
/images/users
and/images/cms
write to different locations, than to rewrite the application to useimages_user:/
andimages_cms:/
.The text was updated successfully, but these errors were encountered: