Dynamic share providers / share types in Nextcloud #29215
Description
My colleague @ylebre is working on a project that makes it possible to connect Nextcloud servers to Sciencemesh.
For this project we need to add custom handling for File Sharing. This also means we need a custom sharing type.
For our custom install, we can just add another class constant to the lib/public/Share/IShare.php
interface, and custom handling logic for this type.
But when we were looking at the code, we saw a comment in the Share20 Manager
class that says:
We can't handle other types yet
Hmmm... "yet"? 🤔
And in the Share20 ProviderFactory
, the latest addition (for share type IShare::TYPE_DECK
)
uses $this->getProvider('deck')
instead of $this->getDeckShareProvider()
.
This got us thinking that Nextcloud might benfit from an implementation that makes is possible to dynamically add share providers (types and logic). This could be very useful for Nextcloud plugins.
So my question is:
Is there any interest in merging such functionality, if provided? (Including any docs or tests deemed necessary)
From what we can see, we think this would be a relatively small change.
Files that we can see that need to be touched are:
apps/files_sharing/lib/Controller/ShareAPIController.php
and related testlib/private/Share20/Manager.php
and related testlib/private/Share20/ProviderFactory.php
(no tests seem to be available?)
Is the information I've shared here complete and correct? Am I missing anything?
And if there's an interest, which steps would we need to take in order to make this happen?
How to use GitHub
- Please use the 👍 reaction to show that you are interested into the same feature.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Activity