Unified file storage step & disk targets (local disk, S3, etc.)

Unified file storage step & disk targets (local disk, S3, etc.)

Instead of using separate steps for local disk or S3 file manipulation, use a common step with the ability to dynamically specify which “disk target” to use. This would allow different server targets to use different disk targets (e.g.: for local development use local disk, for remote target use S3) without doing any step changes. Each server target would have its own list of disk targets.

Inspired by Laravel:

Storage::disk('local')->put('example.txt', 'Contents');
Storage::disk('s3')->put('example.txt', 'Contents');

Inspired by Flysystem:

Flysystem is a file storage library for PHP. It provides one interface to interact with many types of filesystems. When you use Flysystem, you’re not only protected from vendor lock-in, you’ll also have a consistent experience for which ever storage is right for you.

Personally I’m not in need of this feature right now, but it’s something I remembered about. Would an unified file storage step cater the needs of those using both local and S3 access? Or is there any technical detail that would make people prefer to use separate steps?