Friendica + WebDAV/$API = Nextcloud-Ready?

What do you think?, especially those @Friendica Developers ? Is it possible to rewrite #Friendica to have some "wrapper class" for storing pictures/movies locally (default) or remotely on a #WebDAV share like with Nextcloud?

Or does #Nextcloud have an other API for file storage/retrieval than WebDAV? Would be cool to not have pictures stored on so many places. Sure you need then a "WebDAV browser" where you can easily select your files you want to link here (including music files and videos, of course).
I'm full of good ideas, at some point. ;-) But sadly so little time ...
Oh, updating messages is also #working. Nice. :-) I thought it might be to experimental ...
@heluecht @bes @roland That's a good idea! App.net had something similar ("cloud" storage for post attachments plus accessable via DAV) and people really liked it.
48.5473117 11.2710317
Hi Roland,
I have made a Windows Phone app which auto-uploads photos to any webdav capable server (i.e. for owncloud). Recently I tested the app with Nextcloud, too. As it worked as expected, I can tell you that nextcloud is using the same webdav api calls as other webdav clients.

I understand your idea of having one central repository for your photos etc., but I see an issue with the setup of Friendica having the photo data in the database . Probably it is not a big issue to create an addon providing a webdav explorer integrated within the Friendica website. But this is not your intended benefit, as Friendica core don't yet know your webdav files in this case, you need to do a manual step for uploading a photo from webdav server into Friendica database, when you want to use it here. So, no big difference to current situation in my opinion.
Still the file itself is not stored on Friendica but on Nextcloud. Then also the database needs to be changed a bit to allow "external" storage.
Yes, by having "storage engine" classes which can be configured which one to use.
Abstracting storing files, like:

- LocaStorage (stores files on local directory
- WebDavStorage (stores files on any WebDAV, let's make a simple WUI here for NextCloud/OwnCloud configuration to encourage people using it)
- SftpStorage (stores files over an SFTP link)
- FooStorage (stores files the foo-way)

And many more. So how to procede?
If one has a path for storage, you can let the OS figure out what it is.

eg, Friendica looks in a directory called /storage

This can literally be a directory called /storage...or you can add an fstab entry to add an arbitrary type of remote file system mounted at /storage.