We don’t provide official support for alternative adapters, but it’s possible to get working some caveats.
The most straight forward is to:
- override this bit of the asset config to use your own adapters.
The key thing those two adapters are doing is generating URLs to the files. In theory, you could reuse
SilverStripe\Assets\Flysystem\FlysystemAssetStore to serve the files if you keep pointing the URL for files looking like
http://example.com/assets/hello.jpg. However, this will mean that the server will need to fire off a PHP worker and download the file each time a user asks for it … which would potentially be very painful if your file adapter has a high latency.
The way the S3 adapter gets around this is by generating links that point directly to S3. To achieve that you will need to implement your own AssetAdapter.
Last time I looked at
silverstripe/s3, I thought it would be relatively easy to update it to be a bit more generic so it works with other similar services. If I were you, I might start by forking that module.
I’ll be honest with you, what you are trying to do achieve is not trivial. To hack a solution together will probably take several days. To get something production ready, would probably take several weeks. That’s why we don’t officially support the
silverstripe/s3 module and other alternatives.