New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide public APIs to register storage wrappers #26786
Comments
Hey, this issue has been closed because the label (This is an automated comment from GitMate.io. |
This will be problematic. Any app could register a wrapper and might insert the wrapper in any place of the wrapper chain. Controlling the wrapper order is something we mustn't delegate, and it should be responsability of whatever is creating the storage (which I guess is core).
The only thing that might fit is to somehow allow the admin to configure the chain via the config.php file or other mechanism, but that will also be problematic for the admin |
To put it differently: we already have many apps that cheat and still use the private API to register storage wrappers to achieve their functionality. So far it works fine but as you say it could become problematic if the order of wrappers is determined by app loading order and not deterministic. |
I guess the best compromise is to allow the apps to add the wrapper in specific sections of the chain, not exactly "beginning", "middle", "end" but kind of, based on the expected functionality that the wrapper will provide. This might work if we get a good naming scheme for each part of the chain based on the expected functionality that should be placed there. Note that we'll also need to deal with incompatibilities among the wrappers. |
Currently storage wrappers can only be registered through the private
preSetup
hook on the Filesystem object, theWrapper
class itself is private and also the wrap method is: https://github.com/owncloud/core/blob/master/apps/files_trashbin/lib/Storage.php#L181We should move these to the public namespace to make storage wrapper public.
That is, unless we want to get rid of storage wrappers altogether...
@DeepDiver1975 @jvillafanez @butonic
The text was updated successfully, but these errors were encountered: