Uh oh!
There was an error while loading. Please reload this page.
Adding dav resource for avatars - #4062
Conversation
mention-bot
commented
Mar 26, 2017
@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.
|
MariusBluem
commented
Mar 26, 2017
@schiessle for federated profile pictures in sharing dialog 😁 |
rullzer
commented
Mar 26, 2017
So, few things.
Anyway. Will look into it. |
LukasReschke
left a comment
There was a problem hiding this comment.
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.
I don't like this as it gets an image. Instead of just a file...
rullzer
commented
Mar 26, 2017
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 |
rullzer
commented
Mar 26, 2017
Altough I'm not sure how we can set caching headers.... |
| if ($this->ext === 'png') { | ||
| imagepng($res); | ||
| } else { | ||
| impagejpeg($res); |
There was a problem hiding this comment.
Message: Call to undefined function OCA\DAV\Avatars\impagejpeg()
@rullzer 😉 – Also time to add tests to this 😝
LukasReschke
commented
Mar 26, 2017
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>
rullzer
commented
Mar 29, 2017
Ok lets get this in and fixup the remaining stuff later. |
MorrisJobke
commented
Mar 29, 2017
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 ;)