Repository navigation
Add avatar dav endpoint - #21311
Add avatar dav endpoint#21311rullzer wants to merge 2 commits into
Conversation
|
By analyzing the blame information on this pull request, we identified @DeepDiver1975, @PVince81 and @schiesbn to be potential reviewers |
|
Tested and works nicely :) 👍 |
|
@rullzer please add the extension to the url. |
|
a request to get the avatar should really look like |
|
@DeepDiver1975 no. Since avatars can be jpg or png. There is no way to know which beforehand (or we need to convert them on the fly). The old endpoint also does not have this and I assume it is for the same reason. |
|
If users were Webdav resources, they could all have a "avatar" property that points to the URL of the avatar with the correct extension. |
|
I don't care how we'll handle it. I just want to make sure that there is only 1 request to the server to obtain avatars :P And not 2. |
we better do - see my code - thx |
a property like that can be added easily - caldav and carddav define a home propery - see http://icalendar.org/CalDAV-Access-RFC-4791/6-2-1-caldav-calendar-home-set-property.html |
|
Yes I was planning to do that in a followup PR. But still this adds an extra server call for all avatars |
|
Ok so as discussed on IRC: Probabaly it makes sense to add the availibity of an avatar to the shareeAPI. That way clients will not retrieve the avatar if it is not there. If the avatar is available we could include an URL template. Something like That way clients can themself efficiently generate the URL. So... TODO:
|
|
Ok now with file extension. I'll fix the other stuff in other PR's since it different parts of the code and code wise unrelated. |
Does this mean you will then in the api call all the remote web davs to check the availability? makes no sense to me, or did I not understand you correctly? |
|
@nickvergessen no that is not what I ment. The whole story is that I talked to @DeepDiver1975 and when we have carddav sharing for federated shares (so your ownCloud instance 'knows' the users on my instance). That those vcards also contain the avatar. Thus if we know the remote we could easily generate the avatar locally eventually. It is something we need to think more about to streamline (Where to store those avatars... etc). But the idea seems nicer. |
|
Let me close this as it will need to be reworked largely anyway. |
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This add an avatar collection to the new dav endpoint. Right now it is still authenticated but once we figure it out properly we can have anonymous actions here (for getting!) avatars. But for now it will allow authenticated clients to retrieve avatars for local users.
Pretty straight forward actually.
CC: @DeepDiver1975 @PVince81 @nickvergessen