[owncloud-devel] External Storages

Vincent Petry pvince81 at owncloud.com
Fri Dec 12 09:10:18 GMT 2014


Hello Pierre,

Have a look at how the files_external app does it, for example look at
"swift.php".

Basically you need to provide an implementation of the "Storage"
interface. Best is having it based on "\OC\Files\Storage\Common".
See
https://github.com/owncloud/core/blob/v7.0.4/apps/files_external/lib/swift.php#L32

Then you register the backend from your app with a call to
OC_Mount_Config::registerBackend():
https://github.com/owncloud/core/blob/v7.0.4/apps/files_external/appinfo/app.php#L107

Note: this might be improved a bit in OC 8. I realize these APIs aren't
even public (public APIs start with \OCP).
But that should do for now.

Another example here for iRODS: https://github.com/owncloud/files_irods

Hope this helps.

Cheers,

Vincent

On 12/12/2014 08:39 AM, Pierre Jochem wrote:
> Dear Owncloud Developer Team,
>
> I want to create own external storages but due to missing or unknown documentation it is hard to figure out what does the class needs to populate the file area. I'm really sure you use DI for the magic and a small class overview would be awesome and could speed up my development which I will share with everybody when I'm done. I will write a documentation for this as consideration.
>
> Thank you in advance
>
> Cheers
>
> Pierre
> _______________________________________________
> Devel mailing list
> Devel at owncloud.org
> http://mailman.owncloud.org/mailman/listinfo/devel


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.owncloud.org/pipermail/devel/attachments/20141212/dd043ba0/attachment.sig>


More information about the Devel mailing list