-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding dav resource for avatars #4062
Conversation
@MorrisJobke, thanks for your PR! By analyzing the history of the files in this pull request, we identified @LukasReschke, @bartv2 and @tanghus to be potential reviewers. |
Codecov Report
@@ Coverage Diff @@
## master #4062 +/- ##
===========================================
+ Coverage 54.06% 54.27% +0.2%
- Complexity 21274 21305 +31
===========================================
Files 1252 1313 +61
Lines 74088 81222 +7134
Branches 0 1284 +1284
===========================================
+ Hits 40055 44081 +4026
- Misses 34033 37141 +3108
Continue to review full report at Codecov.
|
@schiessle for federated profile pictures in sharing dialog 😁 |
So, few things.
Anyway. Will look into it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do some changes to satisfy coverage and CI style.
} | ||
|
||
public function get() { | ||
$image = $this->avatar->get($this->size); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like this as it gets an image. Instead of just a file...
Also no caching headers are set. Which would mean that if we switch over this will result in a shitload of requests to the server again |
Altough I'm not sure how we can set caching headers.... |
apps/dav/lib/Avatars/AvatarNode.php
Outdated
if ($this->ext === 'png') { | ||
imagepng($res); | ||
} else { | ||
impagejpeg($res); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Message: Call to undefined function OCA\DAV\Avatars\impagejpeg()
@rullzer 😉 – Also time to add tests to this 😝
Probably something like |
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
6e537c8
to
7cc96c2
Compare
Ok lets get this in and fixup the remaining stuff later. |
Tested and works 👍 |
@rullzer @mario @marinofaggiana @AndyScherzinger @tobiasKaminsky Might be interesting for you. Then you don't need private APIs anymore and can also fetch it via WebDAV ;)