You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 19, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 19, 2024. It is now read-only.
Like the title says it would be nice to have an Operation to load a user's avatar.
This can imho be supported for oC v8.2 while being logged in requesting the image via
/index.php/avatar//
@tobiasKaminsky@przybylski fancy some collaboration? 😃 I started working on this but hit a roadblock when trying to make use of the (untested) implementation since the AccountManager gets involved and would need to put the loading of the avatars into some asynchronous processing.
@DeepDiver1975 can the avatar be loaded via the url? --> /index.php/avatar/username/pixelsize or is this kind of a hack since the changes made in owncloud/core#14856 have been reverted but I think it would be a nice feature to have the avatars in the mobile app(s).
I read the /core issue you have mentioned. As far as I can see the PR has been reverted.
So, I can add this to my local cloud for testing, but we will have to wait for official integration.
(And hope that it will be implemented the same way)
So I am not sure if we should do it now.
There is as far as I know currently no implementation to get the avatar on server side.
If so, please post an example url and we can use it right away :)
That 128 is a size of the returned avatar, it can be adjusted accordingly.
Then you just executeMethod on that URL on already implemeted OwnCloudClient (so you don't need to implement your own authentication and its already handled for you) in the android application.
If no image is returned, meaning no avatar has been set for the user, you can just show the default person icon (the one that is currently used in the app).
@tobiasKaminsky Thanks! I still wou,d like to get some comment from @DeepDiver1975 since I don't now if the URL pattern I mentioned (and also @Skymania) is actually an official API and working on purpose.
I agree with @LukasReschke - we shouldn't use an unofficial API. Is anyone able to contact @DeepDiver1975 about the server side issue? In my opinion it would be nice to have this for consistency and I also think it adds to the user experience.
@AndyScherzinger i'm afraid that the development for oc9 is locked down; just sev1 and sev2 bug fixed. The release is around the corner, Tuesday 8
The issue that you are pointing out is labeled for oc9.1 so next version
@rperezb thanks for the update, yeah I realized that, so I asked if it can be committed for 9.1 knowing it is sheduled but probably not a priority which is fine with me, but I am more a guy who is motivated to work on UI rather then functional features, so I try to push stuff forward that adds value to the user interface :)
As for the reason why I would like to have the avatar loading in the library instead of in the app is simply to offer this to third party apps so they can also show avatars helping consistency throughout apps.
I totally support that view. Joining in :)
Server part is now scheduled for 9.2. Will have to wait a little bit more.
Hi,
In #132 i suggest to unify the OCS controllers in one place, just like ocs/v1.php/cloud/capabilities, ocs/v1.php/apps/files_sharing and ocs/v1.php/cloud/user
This request to retrieve the user's avatar could be part of the User Provisioning API? because with version 2.1.0 there is a new call pointing to cloud/index.php/ocs/cloud/user?format=json to get the user's display name, and now there is a new call to index.php/avatar to process an OCS request.
If both requests are for user's information, should not be both calls in the same place? ocs/v1.php/cloud/user maybe?
Activity
AndyScherzinger commentedon Feb 8, 2016
I started (trying) to implement this on the following branch https://github.com/owncloud/android-library/tree/avatar (dry coding atm).
https://github.com/owncloud/android-library/blob/avatar/src/com/owncloud/android/lib/resources/users/GetRemoteUserAvatarOperation.java
AndyScherzinger commentedon Feb 9, 2016
@tobiasKaminsky @przybylski fancy some collaboration? 😃 I started working on this but hit a roadblock when trying to make use of the (untested) implementation since the AccountManager gets involved and would need to put the loading of the avatars into some asynchronous processing.
@DeepDiver1975 can the avatar be loaded via the url? --> /index.php/avatar/username/pixelsize or is this kind of a hack since the changes made in owncloud/core#14856 have been reverted but I think it would be a nice feature to have the avatars in the mobile app(s).
AndyScherzinger commentedon Feb 9, 2016
@davivel @masensio @rperezb would this feature be something you would like to be added/contributed to the app/lib?
tobiasKaminsky commentedon Feb 9, 2016
I will ave a look on thursday afternoon (german timezone)
AndyScherzinger commentedon Feb 10, 2016
Awesome! I would really like to add this feature to the app and can take care of embedding it in the UI with circle shape and stuff like that.
tobiasKaminsky commentedon Feb 10, 2016
I read the /core issue you have mentioned. As far as I can see the PR has been reverted.
So, I can add this to my local cloud for testing, but we will have to wait for official integration.
(And hope that it will be implemented the same way)
So I am not sure if we should do it now.
AndyScherzinger commentedon Feb 12, 2016
@DeepDiver1975 can you give us some more details if and when this would be available on the server side? :)
ddijak commentedon Feb 12, 2016
Why dont you just use an existing OwnCloudClient and executeMethod to get the avatar? The whole thumbnail processing is made that way...
tobiasKaminsky commentedon Feb 12, 2016
There is as far as I know currently no implementation to get the avatar on server side.
If so, please post an example url and we can use it right away :)
ddijak commentedon Feb 12, 2016
@AndyScherzinger had a right idea.
private String getAvatarURL(OwnCloudAccount oca) {
int lastAtPos = oca.getName().lastIndexOf("@");
String username = oca.getName().substring(0, lastAtPos);
return String.valueOf(oca.getBaseUri() + "/index.php/avatar/" + username + "/128");
}
That 128 is a size of the returned avatar, it can be adjusted accordingly.
Then you just executeMethod on that URL on already implemeted OwnCloudClient (so you don't need to implement your own authentication and its already handled for you) in the android application.
If no image is returned, meaning no avatar has been set for the user, you can just show the default person icon (the one that is currently used in the app).
Thats how I implemented avatars.
tobiasKaminsky commentedon Feb 12, 2016
Great, this is working.
But I thought this could not work as the PR in /core was reverted.
Strange...
@AndyScherzinger I will have a look soon.
AndyScherzinger commentedon Feb 12, 2016
@tobiasKaminsky Thanks! I still wou,d like to get some comment from @DeepDiver1975 since I don't now if the URL pattern I mentioned (and also @Skymania) is actually an official API and working on purpose.
7 remaining items
LukasReschke commentedon Feb 15, 2016
Not an official public API from what I can tell. I'd rather not rely on it at the moment.
AndyScherzinger commentedon Feb 16, 2016
I agree with @LukasReschke - we shouldn't use an unofficial API. Is anyone able to contact @DeepDiver1975 about the server side issue? In my opinion it would be nice to have this for consistency and I also think it adds to the user experience.
AndyScherzinger commentedon Mar 3, 2016
@jancborchardt any chance to get this with oC9 ? Would be nice to have this via a public API 🎉
EDIT: it has been postponed to 9.1 --> owncloud/core#14564
rperezb commentedon Mar 4, 2016
@AndyScherzinger i'm afraid that the development for oc9 is locked down; just sev1 and sev2 bug fixed. The release is around the corner, Tuesday 8
The issue that you are pointing out is labeled for oc9.1 so next version
AndyScherzinger commentedon Mar 4, 2016
@rperezb thanks for the update, yeah I realized that, so I asked if it can be committed for 9.1 knowing it is sheduled but probably not a priority which is fine with me, but I am more a guy who is motivated to work on UI rather then functional features, so I try to push stuff forward that adds value to the user interface :)
jancborchardt commentedon Mar 8, 2016
cc'ing @PVince81 so we can get this into 9.1 :)
davivel commentedon Jul 14, 2016
I totally support that view. Joining in :)
Server part is now scheduled for 9.2. Will have to wait a little bit more.
daorte commentedon Aug 29, 2016
Hi,
In #132 i suggest to unify the
OCScontrollers in one place, just likeocs/v1.php/cloud/capabilities,ocs/v1.php/apps/files_sharingandocs/v1.php/cloud/userThis request to retrieve the user's avatar could be part of the User Provisioning API? because with version 2.1.0 there is a new call pointing to
cloud/index.php/ocs/cloud/user?format=jsonto get the user's display name, and now there is a new call toindex.php/avatarto process anOCSrequest.If both requests are for user's information, should not be both calls in the same place?
ocs/v1.php/cloud/usermaybe?davivel commentedon Aug 30, 2016
Well, that's probably a question better suited for owncloud/core#14564. The API is decided in the server side.
shashvat-kedia commentedon May 15, 2019
@davigonz Is this still required? If yes then can I work on this?
davigonz commentedon May 16, 2019
It seems this needs owncloud/core#14564 before, so let's wait a bit
JuancaG05 commentedon May 30, 2023
Outdated, closing here 🚀