Using alternate Flysystem adapters

The [OJS] File Service is a small wrapper around Flysystem. […] Adaptors are available for other file systems such as AWS and Azure.

If I’m not mistaken, there’s no mechanism for configuring an adapter other than local.

It seems fairly trivial to create an alternate to PKPFileService that configures another adapter.

Can I re-register the file service in a plugin in a similar way to OJSServiceProvider? Or is this best done by patching OJSServiceProvider itself?

Ah, looking closer at __construct in PKPFileService I see there’s a File::adapter hook.

And there’s a File::download hook for achieving my secondary goal of having users download directly from AWS S3.


This topic was automatically closed after 7 days. New replies are no longer allowed.